将一个普通JavaWeb项目改造成 Spring boot 项目

1、新建javaWeb项目:

     

     

2、修改build.gradle文件

     

  •     plugins{
  •         id 'org.springframework.boot'version'2.2.5.RELEASE'
  •         id 'io.spring.dependency-management'version'1.0.9.RELEASE'
  •         id 'java'
  •     }
  •     
  •     repositories{
  •         maven{
  •          url"http://maven.aliyun.com/nexus/content/groups/public/"
  •         }
  •     }
  •     
  •     dependencies{
  •         implementation'org.springframework.boot:spring-boot-starter-web'
  •         testImplementation('org.springframework.boot:spring-boot-starter-test'){
  •         excludegroup:'org.junit.vintage',module:'junit-vintage-engine'
  •         }
  •     }

     

     

     

3、新建Application.class 启动类。

posted @ 2020-10-19 21:58  黑质白章  阅读(2774)  评论(0编辑  收藏  举报