db.properties如下:
#database connection config
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/test2?useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
jdbc.username=root
jdbc.password=root
#hibernate config
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.show_sql=true
hibernate.format_sql=true
hibernate.hbm2ddl.auto=create
hibernate.engin=InnoDB
current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
注意驱动名更改为
jdbc.driver=com.mysql.cj.jdbc.Driver
新增SSL设置和时区设置