码迷,mamicode.com
首页 > 其他好文 > 详细

使用Feign访问接口的依赖配置

时间:2017-11-01 01:15:06      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:feign   ati   java   work   1.5   访问   dal   script   UI   

 

使用Feign访问接口的配置,如果服务不在Eureka上,可以不加Eureka的依赖,用在FeignClient上指定url的方式访问


buildscript {
    ext {
        springBootVersion = ‘1.5.8.RELEASE‘
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: ‘java‘
apply plugin: ‘org.springframework.boot‘

group = ‘com.example‘
version = ‘0.0.1-SNAPSHOT‘
sourceCompatibility = 1.8

repositories {
    mavenCentral()
}


dependencies {
    compile(‘org.springframework.boot:spring-boot-starter-web‘)
    compile(‘org.springframework.cloud:spring-cloud-starter-feign‘)
    compile(‘org.springframework.cloud:spring-cloud-starter-eureka‘)
    testCompile(‘org.springframework.boot:spring-boot-starter-test‘)
}

ext {
    springCloudVersion = ‘Dalston.SR4‘
}
dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

 

使用Feign访问接口的依赖配置

标签:feign   ati   java   work   1.5   访问   dal   script   UI   

原文地址:http://www.cnblogs.com/longling2344/p/7764540.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!