-
搞了将近几天,才把 maven 仓库,以及log4J配好,之前总是报证书,还有栈溢出的错误,下面是我踩坑之后可以使用的 build.gradle 配置
-
我看网上说 implementation 这个引包比较好
-
我这个只搞了 2.1.4.RELEASE 可以使用,其他的还没试过
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
}
plugins {
id 'org.springframework.boot' version '2.1.4.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
configurations {
providedRuntime
compile.exclude module: 'spring-boot-starter-logging'
}
dependencies {
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
compileOnly 'org.projectlombok:lombok:1.18.4'
implementation 'com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5'
implementation 'com.microsoft:sqljdbc4:3.0'
implementation 'mysql:mysql-connector-java'
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/google'}
maven { url 'https://maven.aliyun.com/repository/jcenter'}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
}