學習教程:
從零搭建自己的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