将一个普通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 启动类。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM