学习spring boot的小白遇到的问题
原先代码有好几处其他的错误,改了好久其他错误改没了,现在又出现了 The server time zone value '?й???????' is unrecognized or represents more than one time zone。这个错误!!!
找了好多方法找到了下面这个改动的地方,终于是改好了。
方法是:
在项目代码 url连接的数据库后面添加 ?serverTimezone=GMT 若要使用GMT+8时区,则改写为 ?serverTimezone=GMT%2B8
url 连接的数据库改动:
url: jdbc:mysql://127.0.0.1:3306/mall?serverTimezone=GMT%2B8
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: 350628hmh
url: jdbc:mysql://127.0.0.1:3306/mall?serverTimezone=GMT%2B8
mybatis:
configuration:
map-underscore-to-camel-case: true