集成eureka注册中心、feign调用。
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.adc.da;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
|
||||
|
||||
/**
|
||||
* eureka注册发现中心
|
||||
*/
|
||||
@EnableEurekaServer
|
||||
@SpringBootApplication
|
||||
public class CenterApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CenterApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
server:
|
||||
port: 8123
|
||||
eurekt:
|
||||
server:
|
||||
responseCacheUpdateInvervalMs: 3000
|
||||
eureka:
|
||||
server:
|
||||
enable-self-preservation: false
|
||||
responseCacheAutoExpirationInSeconds: 180
|
||||
eviction-interval-timer-in-ms: 4000
|
||||
client:
|
||||
register-with-eureka: false
|
||||
fetch-registry: false
|
||||
service-url:
|
||||
defaultZone: http://localhost:8123/eureka/
|
||||
ribbon:
|
||||
ConnectTimeout: 360000
|
||||
MaxAutoRetries: 2
|
||||
MaxAutoRetriesNextServer: 1
|
||||
ReadTimeout: 360000
|
||||
@@ -0,0 +1,20 @@
|
||||
server:
|
||||
port: 8888
|
||||
eurekt:
|
||||
server:
|
||||
responseCacheUpdateInvervalMs: 3000
|
||||
eureka:
|
||||
server:
|
||||
enable-self-preservation: false
|
||||
responseCacheAutoExpirationInSeconds: 180
|
||||
eviction-interval-timer-in-ms: 4000
|
||||
client:
|
||||
register-with-eureka: false
|
||||
fetch-registry: false
|
||||
service-url:
|
||||
defaultZone: http://localhost:8888/eureka/
|
||||
ribbon:
|
||||
ConnectTimeout: 360000
|
||||
MaxAutoRetries: 2
|
||||
MaxAutoRetriesNextServer: 1
|
||||
ReadTimeout: 360000
|
||||
@@ -0,0 +1,20 @@
|
||||
server:
|
||||
port: 8888
|
||||
eurekt:
|
||||
server:
|
||||
responseCacheUpdateInvervalMs: 3000
|
||||
eureka:
|
||||
server:
|
||||
enable-self-preservation: false
|
||||
responseCacheAutoExpirationInSeconds: 180
|
||||
eviction-interval-timer-in-ms: 4000
|
||||
client:
|
||||
register-with-eureka: false
|
||||
fetch-registry: false
|
||||
service-url:
|
||||
defaultZone: http://localhost:8888/eureka/
|
||||
ribbon:
|
||||
ConnectTimeout: 60000
|
||||
MaxAutoRetries: 2
|
||||
MaxAutoRetriesNextServer: 1
|
||||
ReadTimeout: 60000
|
||||
@@ -0,0 +1,3 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
@@ -0,0 +1,9 @@
|
||||
${AnsiColor.RED} _ _
|
||||
__ _ __| | ___ __| | __ _
|
||||
/ _` |/ _` |/ __|____ / _` |/ _` |
|
||||
| (_| | (_| | (_|_____| (_| | (_| |
|
||||
\__,_|\__,_|\___| \__,_|\__,_|
|
||||
|
||||
${AnsiColor.YELLOW}------------------------------------------------
|
||||
${AnsiColor.YELLOW} :: ${AnsiColor.YELLOW}@数据资源中心
|
||||
${AnsiColor.YELLOW}------------------------------------------------${AnsiColor.WHITE}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class ApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user