使用Gradle:
dependencies { compile("org.springframework.boot:spring-boot-starter-web") providedCompile("org.springframework.boot:spring-boot-starter-tomcat")//此处使用providedCompile,则生成的jar包可放入tomcat内运行 // compile("org.springframework.boot:spring-boot-starter-tomcat")//我们再开发的时候,使用这个,打包为war时使用providedCompile testCompile group: 'junit', name: 'junit', version: '4.11' } 重点为使用providedCompile
apply plugin: 'war'
如图:
124 篇文章
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!