方式一
spring.datasource.url=jdbc:mysql://localhost/clientdb?serverTimezone=UTC
spring.datasource.username=testuser
spring.datasource.password=test
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.properties.hibernate.hbm2ddl.auto=validate
方式二
spring.datasource.url=jdbc:mysql://localhost:3306/clientdb?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
spring.datasource.username=testuser
spring.datasource.password=test
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.properties.hibernate.hbm2ddl.auto=validate
注意:如果网络连接是公司AD域,则必须用计算名称替代localhost。