入門SSM常見錯誤總結
阿新 • • 發佈:2019-01-23
錯誤資訊:
A query was run and no Result Maps were found for the Mapped Statement解決:
使用mybatis進行查詢時,沒有給定resultType值出現的錯誤。resultType是查詢物件的型別。
https://blog.csdn.net/carl_jiang/article/details/53788447
錯誤資訊:
The server time zone value '?й???????' is unrecognized or represents more than one time zone解決:
在專案程式碼-資料庫連線URL後,加上 (注意大小寫必須一致)
?serverTimezone=UTC
錯誤資訊:
Could not get JDBC Connection
解決:${username}的值並不是jdbc.properties檔案中的username值,而是JVM系統環境變數的username。
錯誤資訊:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
解決:
將com.mysql.jdbc.Driver 改為 com.mysql.cj.jdbc.Driver
錯誤資訊
org.apache.jasper.JasperException: Unable to convert string "${topic.postTime}" to class "java.util.Date" for attribute "value": Property Editor not registered with the PropertyEditorManager
解決:
在jsp頁面頭加:<%@page isELIgnored="false"%>