JBOSS 點(diǎn)滴

          豐豐的博客

          2024年2月17日 #

          mysql5.x忘記密碼

          參考:https://blog.csdn.net/qq_34102150/article/details/126120056


          1、停止MySQL服務(wù),輸入 net stop mysql 停止服務(wù)。
          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、重啟服務(wù)

          posted @ 2024-02-17 15:09 半導(dǎo)體 閱讀(39) | 評(píng)論 (0)編輯 收藏

          2020年8月8日 #

          微信小程序開發(fā)流程

          準(zhǔn)備工作:
              需要https的域名
              1、域名申請(qǐng)、備案   (我是在阿里云買的服務(wù)器,域名也在阿里云購(gòu)買  )
              2、域名與IP綁定 
              3、ssl安全證書 申請(qǐng)(https
              4、下載ssl安全證書布署在tomcat服務(wù)器
              4、在云服務(wù)器tomcat中布署https           
                     參考   https://blog.csdn.net/qq_35206244/article/details/97613498

                    ps:任何操作不會(huì),直接打阿里云客服電話 95187
              
          小程序開發(fā)流程:
              1、在微信官網(wǎng)注冊(cè)帳號(hào)
              2、下載小程序開發(fā)工具
              3、小程序開發(fā)、上傳   
              4、小程序送審,審核通過即可分享給你的朋友

          posted @ 2020-08-08 10:11 半導(dǎo)體 閱讀(116) | 評(píng)論 (0)編輯 收藏

          2020年7月20日 #

          mall 工程創(chuàng)建踩坑

          新建項(xiàng)目坑 
          www.macrozheng.com項(xiàng)目,打開maven總是引入失敗,后來
          https://www.cnblogs.com/dk1024/p/10778841.html


          https://blog.csdn.net/ken_ding/article/details/85623092這個(gè)是前端有可能遇見的坑的解決辦法


           安裝環(huán)境文檔:
          http://www.macrozheng.com/#/deploy/mall_deploy_windows

          posted @ 2020-07-20 21:52 半導(dǎo)體 閱讀(118) | 評(píng)論 (0)編輯 收藏

          2020年6月27日 #

          springboot 打包 后,在dos命令行運(yùn)行提示沒有主清單屬性的解決辦法

          1.在pom.xml文件中插入
          <build>
              <plugins>
                  <plugin>
                      <groupId>org.springframework.boot</groupId>
                      <artifactId>spring-boot-maven-plugin</artifactId>
                  </plugin>
              </plugins>
          </build>
          2.雙擊IDEA右側(cè)Maven Projects的lifecycle下的package,打包成jar,重新執(zhí)行以上命令。

          posted @ 2020-06-27 16:42 半導(dǎo)體 閱讀(207) | 評(píng)論 (0)編輯 收藏

          2020年3月25日 #

          MyBatis出現(xiàn)org.apache.ibatis.executor.ExecutorException異常

          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

          上網(wǎng)找了一些答案也沒有解決我的問題,

          后來發(fā)現(xiàn)原來是User類的構(gòu)造函數(shù)問題,找不到相關(guān)的構(gòu)造函數(shù);試著在User中加一個(gè)默認(rèn)的構(gòu)造函數(shù),就解決了。。。

          希望能幫到大家。

                   默認(rèn)的構(gòu)造函數(shù)在創(chuàng)建構(gòu)造函數(shù)后,不會(huì)自動(dòng)創(chuàng)建默認(rèn)構(gòu)造函數(shù)

          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


            

          這種錯(cuò)也是同樣的問題,


          加上無參構(gòu)造函數(shù)就可以了。


          當(dāng)創(chuàng)建對(duì)象來接受sql結(jié)果時(shí)會(huì)遍歷實(shí)體類的構(gòu)造方法找到與之匹配的,如果實(shí)體類中有構(gòu)造方法了但是參數(shù)不匹配的話就會(huì)報(bào)上述錯(cuò)誤,此時(shí)添加無參構(gòu)造方法(默認(rèn)的構(gòu)造方法),會(huì)走其他方法,
          https://blog.csdn.net/qq_35975416/article/details/80488267




          posted @ 2020-03-25 20:01 半導(dǎo)體 閱讀(5562) | 評(píng)論 (0)編輯 收藏

          2020年3月8日 #

          idea jsp代碼不提示Java代碼

          在<head>里寫java代碼有提示,在<body>里不寫%>就有提示。

          這是由于按提示快捷鍵alt+enter導(dǎo)致。解決方法一直未找到合適的。 
          解決方法:

          posted @ 2020-03-08 20:11 半導(dǎo)體 閱讀(248) | 評(píng)論 (0)編輯 收藏

          項(xiàng)目管理推薦好文

          掙值管理(PV、EV、AC、SV、CV、SPI、CPI)記憶之我見 http://www.cnitpm.com/pm/7707.html https://blog.csdn.net/weixin_38197294/article/details/79852129

          posted @ 2020-03-08 11:41 半導(dǎo)體 閱讀(111) | 評(píng)論 (0)編輯 收藏

          2020年2月8日 #

          jquery傳參及獲取方式

          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發(fā)送異步請(qǐng)求
                        $.post("ajaxServletH",$('#myform').serialize(),function(data){
                            
          var divA = document.getElementById("myText");
                            divA.innerHTML 
          = "<br/><hr><br/>"+data;
                         },
          "text")
                  }
              
          </script>
          獲取值方式二:

          var gender = $ ("input [name= 'gender' ] : checked") .val() ;

          posted @ 2020-02-08 18:36 半導(dǎo)體 閱讀(161) | 評(píng)論 (0)編輯 收藏

          2019年10月16日 #

          spring boot結(jié)合thymeleaf通過后臺(tái)傳入的數(shù)值循環(huán)生成標(biāo)簽

          spring boot結(jié)合thymeleaf通過后臺(tái)傳入的數(shù)值循環(huán)生成標(biāo)簽

           <span th:each="i:${#numbers.sequence(1,page.pages)}">
             
          <span th:text="${i}"/>
          </span>

          posted @ 2019-10-16 16:06 半導(dǎo)體 閱讀(333) | 評(píng)論 (0)編輯 收藏

          2019年10月12日 #

          模態(tài)框傳值

          模態(tài)框傳值:
          https://blog.csdn.net/linhaiyun_ytdx/article/details/77417702

          posted @ 2019-10-12 16:35 半導(dǎo)體 閱讀(149) | 評(píng)論 (0)編輯 收藏

          僅列出標(biāo)題  下一頁
          主站蜘蛛池模板: 博兴县| 麻阳| 屏山县| 城步| 社会| 东兴市| 永康市| 姚安县| 海淀区| 安宁市| 民丰县| 正定县| 娱乐| 东光县| 尚义县| 秀山| 五河县| 泰顺县| 永康市| 盐城市| 淮北市| 外汇| 黄平县| 郑州市| 林西县| 独山县| 靖安县| 延庆县| 青川县| 阳高县| 海丰县| 承德县| 来凤县| 马公市| 南昌市| 黄石市| 共和县| 娱乐| 潞城市| 正蓝旗| 嘉荫县|