問題1 :1.8 新映入時間類使用出現的問題 :LocalDateTime
https://blog.csdn.net/hustzw07/article/details/82824358
關於不同jar 配置的關聯性
問題2:一直提示 mysql數據庫時間類型轉換成java的LocalDateTime報錯,
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: Error attempting to get column 'create_time' from result set. Cause: java.sql.SQLFeatureNotSupportedException
; ]; null; nested exception is java.sql.SQLFeatureNotSupportedException
Conversion not supported for type java.time.LocalDateTime
我的問題是jar的版本問題: mysql-connector-java 各種版本要對應:
問題3: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc limit 0, 10' at line 6
很明顯語法問題:where 不是給 order by 和 limit 用的
問題4: 根據 in傳入的內容排序,但是,最終輸出的結果還是根據 id的大小正序輸出,field 沒有生效???
select * from t_item_sku where id in ( 1537, 15684, 3020, 246, 536)
order by FIELD (‘id’, 1537, 15684, 3020, 246, 536)
原來是應爲field 後面指定的規則 參數 不能加單引號 ,直接 FIELD (‘id’, 1537, 15684, 3020, 246, 536) 就可以排序成功