基础 Gradle 配置
plugins {
id 'io.spring.dependency-management' version '1.0.5.RELEASE'
id 'java'
}
ext { springBootVersion = '2.1.4.RELEASE' }
group 'com.og.auth'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework:spring-context'
compile 'javax.persistence:javax.persistence-api'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
compile 'org.apache.commons:commons-lang3'
//JWT
compile 'io.jsonwebtoken:jjwt:0.9.1'
compile 'io.jsonwebtoken:jjwt-extensions:0.10.7'
//WEB
compile 'org.springframework.boot:spring-boot-starter-web:2.1.8.RELEASE'
//FAST JSON
compile 'com.alibaba:fastjson:1.2.60'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'mysql:mysql-connector-java'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
dependencyManagement {
imports { mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}") }
}
在 https://search.maven.org 搜索需要引入 jar 例如 fastJson 会在右边出来各类引用 url
image.png
网友评论