Commit e7896be9 authored by 窦家骏's avatar 窦家骏

spring cloud基础配置

parent 8cb2aa1e
buildscript {
ext {
springBootVersion = '2.3.1.RELEASE'
}
repositories {
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
plugins {
id 'org.springframework.boot' version '2.3.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://repo.spring.io/milestone" }
mavenCentral()
}
ext {
set('springCloudVersion', "Hoxton.SR6")
}
dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-consul-discovery'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'io.github.openfeign:feign-okhttp'
implementation 'org.springframework.retry:spring-retry'
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment