1、把以前spring boot项目的pom.xml导入进来
2、修改pom.xml 里面项目名改成自己项目名
3、复制配置文件
1 spring: 2 datasource: 3 url: jdbc:mysql://localhost:3306/1706b?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai 4 username: root 5 password: root 6 jpa: 7 show-sql: true 8 hibernate: 9 ddl-auto: update 10 redis: 11 host: localhost
4、src 建立主类App
1 @SpringBootApplication 2 public class App { 3 4 public static void main(String[] args) { 5 SpringApplication.run(App.class, args); 6 } 7 8
5、这样就可以搭建jpa 项目了。