2024年2月17日
参考:https://blog.csdn.net/qq_34102150/article/details/126120056
1、停止mysql服务,输入 net stop mysql 停止服务。
2、切换到mysql的bin文件下,
mysql5.x: mysqld --console --skip-grant-tables --shared-memory
mysqld --console --skip-grant-tables --shared-memory
3、输入mysql -uroot -p回车,不用输入密码,直接按回车跳过,
输入: use mysql
输入: update user set password=password('123456') where user='root';
或者: grant all privileges on *.* to 'root'@'%'identified by '123456' with grant option;
输入: flush privileges;
4、重启服务
2020年8月8日
准备工作:
需要https的域名
1、域名申请、备案 (我是在阿里云买的服务器,域名也在阿里云购买 )
2、域名与ip绑定
3、ssl安全证书 申请(
https) 4、下载ssl安全证书布署在tomcat服务器
4、在云服务器tomcat中布署https
参考 https://blog.csdn.net/qq_35206244/article/details/97613498
ps:任何操作不会,直接打阿里云客服电话 95187
小程序开发流程:
1、在微信凯发k8网页登录官网注册帐号
2、下载小程序开发工具
3、小程序开发、上传
4、小程序送审,审核通过即可分享给你的朋友
2020年7月20日
新建项目坑
www.macrozheng.com项目,打开maven总是引入失败,后来
https://www.cnblogs.com/dk1024/p/10778841.html
https://blog.csdn.net/ken_ding/article/details/85623092这个是前端有可能遇见的坑的解决办法
安装环境文档:
http://www.macrozheng.com/#/deploy/mall_deploy_windows
2020年6月27日
1.在pom.xml文件中插入
org.springframework.boot
spring-boot-maven-plugin
2.双击idea右侧maven projects的lifecycle下的package,打包成jar,重新执行以上命令。
2020年3月25日
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - opening jdbc connection
debug [main] - created connection 29011566.
debug [main] - setting autocommit to false on jdbc connection [com.mysql.jdbc.jdbc4connection@1baae6e]
debug [main] - ==> preparing: select * from user where username like concat(?,'%')
debug [main] - ==> parameters: 张(string)
org.apache.ibatis.exceptions.persistenceexception:
### error querying database. cause: org.apache.ibatis.executor.result.resultmapexception: error attempting to get column 'username' from result set. cause: java.sql.sqlexception: cannot convert value 'å¼ ä¸' from column 2 to timestamp.
### the error may exist in sqlmap/user.xml
### the error may involve test.finduserbyname3
### the error occurred while handling results
### sql: select * from user where username like concat(?,'%')
### cause: org.apache.ibatis.executor.result.resultmapexception: error attempting to get column 'username' from result set. cause: java.sql.sqlexception: cannot convert value 'å¼ ä¸' from column 2 to timestamp.
at org.apache.ibatis.exceptions.exceptionfactory.wrapexception(exceptionfactory.java:30)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectlist(defaultsqlsession.java:149)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectlist(defaultsqlsession.java:140)
at com.swjd.test.b.test2(b.java:40)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
at java.lang.reflect.method.invoke(method.java:497)
at org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:50)
at org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12)
at org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:47)
at org.junit.internal.runners.statements.invokemethod.evaluate(invokemethod.java:17)
at org.junit.runners.parentrunner.runleaf(parentrunner.java:325)
at org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:78)
at org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:57)
at org.junit.runners.parentrunner$3.run(parentrunner.java:290)
at org.junit.runners.parentrunner$1.schedule(parentrunner.java:71)
at org.junit.runners.parentrunner.runchildren(parentrunner.java:288)
at org.junit.runners.parentrunner.access$000(parentrunner.java:58)
at org.junit.runners.parentrunner$2.evaluate(parentrunner.java:268)
at org.junit.runners.parentrunner.run(parentrunner.java:363)
at org.junit.runner.junitcore.run(junitcore.java:137)
at com.intellij.junit4.junit4ideatestrunner.startrunnerwithargs(junit4ideatestrunner.java:68)
at com.intellij.rt.execution.junit.ideatestrunner$repeater.startrunnerwithargs(ideatestrunner.java:47)
at com.intellij.rt.execution.junit.junitstarter.preparestreamsandstart(junitstarter.java:242)
at com.intellij.rt.execution.junit.junitstarter.main(junitstarter.java:70)
caused by: org.apache.ibatis.executor.result.resultmapexception: error attempting to get column 'username' from result set. cause: java.sql.sqlexception: cannot convert value 'å¼ ä¸' from column 2 to timestamp.
at org.apache.ibatis.type.basetypehandler.getresult(basetypehandler.java:83)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.createusingconstructor(defaultresultsethandler.java:671)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.createbyconstructorsignature(defaultresultsethandler.java:654)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.createresultobject(defaultresultsethandler.java:618)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.createresultobject(defaultresultsethandler.java:591)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.getrowvalue(defaultresultsethandler.java:397)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handlerowvaluesforsimpleresultmap(defaultresultsethandler.java:354)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handlerowvalues(defaultresultsethandler.java:328)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handleresultset(defaultresultsethandler.java:301)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handleresultsets(defaultresultsethandler.java:194)
at org.apache.ibatis.executor.statement.preparedstatementhandler.query(preparedstatementhandler.java:65)
at org.apache.ibatis.executor.statement.routingstatementhandler.query(routingstatementhandler.java:79)
at org.apache.ibatis.executor.simpleexecutor.doquery(simpleexecutor.java:63)
at org.apache.ibatis.executor.baseexecutor.queryfromdatabase(baseexecutor.java:324)
at org.apache.ibatis.executor.baseexecutor.query(baseexecutor.java:156)
at org.apache.ibatis.executor.cachingexecutor.query(cachingexecutor.java:109)
at org.apache.ibatis.executor.cachingexecutor.query(cachingexecutor.java:83)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectlist(defaultsqlsession.java:147)
24 more
caused by: java.sql.sqlexception: cannot convert value 'å¼ ä¸' from column 2 to timestamp.
at com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:1055)
at com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:956)
at com.mysql.jdbc.sqlerror.createsqlexception(sqlerror.java:926)
at com.mysql.jdbc.resultsetrow.gettimestampfast(resultsetrow.java:1328)
at com.mysql.jdbc.bytearrayrow.gettimestampfast(bytearrayrow.java:124)
at com.mysql.jdbc.resultsetimpl.gettimestampinternal(resultsetimpl.java:6669)
at com.mysql.jdbc.resultsetimpl.gettimestamp(resultsetimpl.java:5988)
at com.mysql.jdbc.resultsetimpl.gettimestamp(resultsetimpl.java:6026)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
at java.lang.reflect.method.invoke(method.java:497)
at org.apache.ibatis.logging.jdbc.resultsetlogger.invoke(resultsetlogger.java:69)
at com.sun.proxy.$proxy6.gettimestamp(unknown source)
at org.apache.ibatis.type.datetypehandler.getnullableresult(datetypehandler.java:39)
at org.apache.ibatis.type.datetypehandler.getnullableresult(datetypehandler.java:28)
at org.apache.ibatis.type.basetypehandler.getresult(basetypehandler.java:81)
41 more
caused by: java.lang.numberformatexception: 张三
at com.mysql.jdbc.stringutils.getint(stringutils.java:756)
at com.mysql.jdbc.resultsetrow.gettimestampfast(resultsetrow.java:1253)
54 more
process finished with exit code -1
上网找了一些答案也没有解决我的问题,
后来发现原来是user类的构造函数问题,找不到相关的构造函数;试着在user中加一个默认的构造函数,就解决了。。。
希望能帮到大家。
默认的构造函数在创建构造函数后,不会自动创建默认构造函数
debug [main] - logging initialized using 'class org.apache.ibatis.logging.slf4j.slf4jimpl' adapter.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - pooleddatasource forcefully closed/removed all connections.
debug [main] - opening jdbc connection
debug [main] - created connection 27155935.
debug [main] - setting autocommit to false on jdbc connection [com.mysql.jdbc.jdbc4connection@19e5ddf]
debug [main] - ==> preparing: select * from user where id=?
debug [main] - ==> parameters: 27(integer)
org.apache.ibatis.exceptions.persistenceexception:
### error querying database. cause: org.apache.ibatis.reflection.reflectionexception: error instantiating class com.swjd.po.user with invalid types () or values (). cause: java.lang.nosuchmethodexception: com.swjd.po.user.<init>()
### the error may exist in sqlmap/user.xml
### the error may involve test.finduserbyid-inline
### the error occurred while setting parameters
### sql: select * from user where id=?
### cause: org.apache.ibatis.reflection.reflectionexception: error instantiating class com.swjd.po.user with invalid types () or values (). cause: java.lang.nosuchmethodexception: com.swjd.po.user.<init>()
at org.apache.ibatis.exceptions.exceptionfactory.wrapexception(exceptionfactory.java:26)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectlist(defaultsqlsession.java:111)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectlist(defaultsqlsession.java:102)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectone(defaultsqlsession.java:66)
at com.test.test1.test1(test1.java:31)
at sun.reflect.nativemethodaccessorimpl.invoke0(native method)
at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)
at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)
at java.lang.reflect.method.invoke(method.java:497)
at org.junit.runners.model.frameworkmethod$1.runreflectivecall(frameworkmethod.java:50)
at org.junit.internal.runners.model.reflectivecallable.run(reflectivecallable.java:12)
at org.junit.runners.model.frameworkmethod.invokeexplosively(frameworkmethod.java:47)
at org.junit.internal.runners.statements.invokemethod.evaluate(invokemethod.java:17)
at org.junit.runners.parentrunner.runleaf(parentrunner.java:325)
at org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:78)
at org.junit.runners.blockjunit4classrunner.runchild(blockjunit4classrunner.java:57)
at org.junit.runners.parentrunner$3.run(parentrunner.java:290)
at org.junit.runners.parentrunner$1.schedule(parentrunner.java:71)
at org.junit.runners.parentrunner.runchildren(parentrunner.java:288)
at org.junit.runners.parentrunner.access$000(parentrunner.java:58)
at org.junit.runners.parentrunner$2.evaluate(parentrunner.java:268)
at org.junit.runners.parentrunner.run(parentrunner.java:363)
at org.junit.runner.junitcore.run(junitcore.java:137)
at com.intellij.junit4.junit4ideatestrunner.startrunnerwithargs(junit4ideatestrunner.java:68)
at com.intellij.rt.execution.junit.ideatestrunner$repeater.startrunnerwithargs(ideatestrunner.java:47)
at com.intellij.rt.execution.junit.junitstarter.preparestreamsandstart(junitstarter.java:242)
at com.intellij.rt.execution.junit.junitstarter.main(junitstarter.java:70)
caused by: org.apache.ibatis.reflection.reflectionexception: error instantiating class com.swjd.po.user with invalid types () or values (). cause: java.lang.nosuchmethodexception: com.swjd.po.user.<init>()
at org.apache.ibatis.reflection.factory.defaultobjectfactory.instantiateclass(defaultobjectfactory.java:86)
at org.apache.ibatis.reflection.factory.defaultobjectfactory.create(defaultobjectfactory.java:48)
at org.apache.ibatis.reflection.factory.defaultobjectfactory.create(defaultobjectfactory.java:41)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.createresultobject(defaultresultsethandler.java:528)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.createresultobject(defaultresultsethandler.java:507)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.getrowvalue(defaultresultsethandler.java:331)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handlerowvaluesforsimpleresultmap(defaultresultsethandler.java:291)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handlerowvalues(defaultresultsethandler.java:266)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handleresultset(defaultresultsethandler.java:236)
at org.apache.ibatis.executor.resultset.defaultresultsethandler.handleresultsets(defaultresultsethandler.java:150)
at org.apache.ibatis.executor.statement.preparedstatementhandler.query(preparedstatementhandler.java:60)
at org.apache.ibatis.executor.statement.routingstatementhandler.query(routingstatementhandler.java:73)
at org.apache.ibatis.executor.simpleexecutor.doquery(simpleexecutor.java:60)
at org.apache.ibatis.executor.baseexecutor.queryfromdatabase(baseexecutor.java:267)
at org.apache.ibatis.executor.baseexecutor.query(baseexecutor.java:137)
at org.apache.ibatis.executor.cachingexecutor.query(cachingexecutor.java:96)
at org.apache.ibatis.executor.cachingexecutor.query(cachingexecutor.java:77)
at org.apache.ibatis.session.defaults.defaultsqlsession.selectlist(defaultsqlsession.java:108)
25 more
caused by: java.lang.nosuchmethodexception: com.swjd.po.user.<init>()
at java.lang.class.getconstructor0(class.java:3082)
at java.lang.class.getdeclaredconstructor(class.java:2178)
at org.apache.ibatis.reflection.factory.defaultobjectfactory.instantiateclass(defaultobjectfactory.java:60)
42 more
process finished with exit code -1
当创建对象来接受sql结果时会遍历实体类的构造方法找到与之匹配的,如果实体类中有构造方法了但是参数不匹配的话就会报上述错误,此时添加无参构造方法(默认的构造方法),会走其他方法,
https://blog.csdn.net/qq_35975416/article/details/80488267
2020年3月8日
在里写java代码有提示,在里不写%>就有提示。
这是由于按提示快捷键alt enter导致。解决方法一直未找到合适的。
解决方法:
挣值管理(pv、ev、ac、sv、cv、spi、cpi)记忆之我见
http://www.cnitpm.com/pm/7707.html
https://blog.csdn.net/weixin_38197294/article/details/79852129
2020年2月8日
html写法
<form id="myform">
<input type="radio" value="1" name="gender">男
<input type="radio" value="2" name="gender">女
<input type="text" name="username" />
<input type="button" value="提交" onclick="fun()"/>
form>
<div id="mytext">div>
获取值方式一
<script src="js/jquery-3.3.1.min.js">script>
<script>
//定义方法
function fun(){
alert($('#myform').serialize());
//使用ajax发送异步请求
$.post("ajaxservleth",$('#myform').serialize(),function(data){
var diva = document.getelementbyid("mytext");
diva.innerhtml = "
"data;
},"text")
}
script>
获取值方式二:
var gender = $ ("input [name= 'gender' ] : checked") .val() ;
2019年10月16日
spring boot结合thymeleaf通过后台传入的数值循环生成标签
<span th:each="i:${#numbers.sequence(1,page.pages)}">
<span th:text="${i}"/>
span>
2019年10月12日
模态框传值:
https://blog.csdn.net/linhaiyun_ytdx/article/details/77417702