原创 spring boot 整合mybatis 無法輸出sql的問題

使用spring boot整合mybatis,測試功能的時候,遇到到了sql問題,想要從日誌上看哪裏錯了,但是怎麼都無法輸出執行的sql,我使用的是log4j2,百度了一下,很多博客都說,加上下面的日誌配置: <lo

原创 程序包com.sun.org.apache.xml.internal.security.utils不存在

編譯項目的時候報這個錯誤: 程序包com.sun.org.apache.xml.internal.security.utils不存 在 at org.apache.maven.plugin.compiler.Abstrac

原创 異常MalformedJsonException: Use JsonReader.setLenient(true) to

Gson解析異常 com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenien

原创 new URI(zk_servers_1) 路徑包含下劃線無法獲取host的問題

spring cloud gateway使用zookeeper作爲註冊中心調用其它服務的時候報了下面這個錯誤: ava.lang.NullPointerException: null at io.netty.util.NetUtil

原创 maven不要配置start-class

不要在pom.xml文件中配置這個屬性: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

原创 InvalidClaimException: The Token can't be used before

###jwt token錯誤 linux服務器上最近使用jwt token的時候遇到了一個奇怪的問題: InvalidClaimException: The Token can't be used before 某個時間 測試庫完

原创 Unexpected end-of-input in VALUE_STRING

使用spring mvc的時候報了這個錯誤: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpect

原创 too much data seeking EOF in CLOSE for HttpChannelOverHttp

測試某個請求的時候報了這個錯誤: .... too much data seeking EOF in CLOSE for HttpChannelOverHttp 產生這個原因的問題有很多,但是大多數都是數據格式錯誤造成的,我的接口的

原创 讀取xml遇到#text

最近使用dom4j讀取xml的時候經常讀取到#text, 在stackoverflow找到了答案: #text : It's whitespace (newlines, spaces, tabs) :) 忽略這個數據的方法 Nod

原创 servlet中跳轉頁面與jdbc操作數據庫

前面大概複習了一下servlet的相關的內容,下面複習一下較爲基礎的的跳轉頁面和jdbc操作數據庫。 返回數據和跳轉頁面 剛開始複習的時候,竟然都想不起來jsp+servlet中如何跳轉頁面,實在是讓人汗顏啊,不得不找教程複習了一下。 s

原创 web.xml的常見配置理解

學習servlet,都需要學習關於web.xml的配置,但是往往又都不關注這些內容,需要使用的時候,很多人都是直接百度,然後複製粘貼,可是真的遇到一些問題,百度又解決不了的時候,就麻煩了,所以做java web開發需要對web.xml有一

原创 MySQLIntegrityConstraintViolationException: Column 'relation' in where clause is ambiguous

今天項目執行sql 的時候,報了這個錯誤: ause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'relatio

原创 Property 'typeAliasesPackage' threw exception; nested exception is java.lang.ExceptionInInitializer

spring 配置啓動遇到了一個奇怪的問題: Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptio

原创 mysql 匹配字符串中是否包含數字

今天需要寫sql查找出字段中包含數字的行,因爲沒有用過,只好百度,得到寫法如下: select name from text where name regex '[0-9]' 在通過上面的語句找出有問題的行之後,需要截取掉數字,我的數據中

原创 ArrayList的add方法報錯: java.lang.UnsupportedOperationException

今天修改以前一個同事的代碼,其中有一句是我新增的代碼: private static List<String> exceptionAPIs = new ArrayList<>(); //調用某些方法,處理數據 File file =