plugins {
id 'org.springframework.boot' version '2.3.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id 'war' //默认是jar包,添加此插件之后支持打war包
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
// war 包名称自定义
bootWar {
// archiveBaseName = 'aaa' //不需要带后缀(会自带版本号:aaa-0.0.1-SNAPSHOT.war)
// archiveFileName ='bb.war' //需要加后缀
}
// jar 包名称自定义
bootJar {
// archiveBaseName = 'aaa' //不需要带后缀(默认形式,会自带版本号:aaa-0.0.1-SNAPSHOT.jar )
archiveFileName ='bb.jar' //需要加后缀
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'mysql:mysql-connector-java'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.71'
compile group: 'com.baomidou', name: 'mybatis-plus-boot-starter', version: '3.3.0'
}
test {
useJUnitPlatform()
}
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
SpringBoot项目打包成war包
SpringBoot项目打包成war包
spring tomcat ide