学习教程:
从零搭建自己的SpringBoot后台框架(一):https://juejin.im/post/5ad6b3c3f265da237c696ba0
问题1:idea程序包javax.persistence不存在
解决方法 下载ejb3-persistence-1.0.2.GA.jar包 导入https://repository.jboss.org/nexus/content/groups/public/org/hibernate/ejb3-persistence/1.
问题2:Could not create connection to database server
Public Key Retrieval is not allowed
解决方案
spring.datasource.url=jdbc:mysql://localhost:3306/mysql?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true