我本地mysql是8.0.20 ,修改了yml文件的鏈接字符串,找了社區(qū)的其他文檔參照過(guò),只能是5.7左右的版本首頁(yè)和商城模塊才不會(huì)爆Sql不兼容的問(wèn)題嗎,還是需要修改DataSource的類(lèi)替換成mysql8所支持的
datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/crmeb_java_beta?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true username: root password: 123456
### SQL: SELECT id,mer_id,image,flat_pattern,slider_image,name,intro,keyword,cate_id,brand_id,category_id,guarantee_ids,price,vip_price,ot_price,unit_name,sales,stock,cost,ficti,browse,code_path,soure_link,video_link,temp_id,sort,rank,spec_type,is_recycle,is_sub,is_show,audit_status,is_audit,reason,is_del,create_time,update_time,type,is_paid_member,is_auto_up,delivery_method,marketing_type,refund_switch,system_form_id,redeem_integral,exchange_num,is_hot FROM eb_product WHERE id=?
### Cause: 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 ',spec_type,is_recycle,is_sub,is_show,audit_status,is_audit,reason,is_del,create_' at line 1
; bad SQL grammar []; nested exception is 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 ',spec_type,is_recycle,is_sub,is_show,audit_status,is_audit,reason,is_del,create_' at line 1]
2025-09-17 13:37:37.214 [http-nio-8080-exec-12] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 200 OK
2025-09-17 13:37:37.214 [http-nio-8080-exec-15] DEBUG org.springframework.web.servlet.DispatcherServlet - Completed 200 OK