Springboot project mysql date storage problems and may not match up and running in a local idea, but packaged jar run newspaper could not find mysql driven solutions

Modify the value pop.xml in scope, if the specific version is amended as follows can be solved

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

 Mysql date type value storage solutions to the current date is not the same:

Modify the database URL for the link

url: jdbc:mysql://127.0.0.1:3306/DBName?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
  

 

Guess you like

Origin www.cnblogs.com/loaderman/p/11298450.html