diff --git a/src/main/java/com/enovate/newretail/eureka/TestController.java b/src/main/java/com/enovate/newretail/eureka/TestController.java deleted file mode 100644 index ad4a8020106346a1106f086124a366f3b4fb49cf..0000000000000000000000000000000000000000 --- a/src/main/java/com/enovate/newretail/eureka/TestController.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.enovate.newretail.eureka; - -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -import com.ctrip.framework.apollo.Config; -import com.ctrip.framework.apollo.spring.annotation.ApolloConfig; - -@RestController -@RequestMapping(path = "/config") -public class TestController { - - @ApolloConfig - private Config config; - - - @RequestMapping(path = "/get/{key}", method = {RequestMethod.GET, RequestMethod.POST}) - public String get(@PathVariable("key") String key) { - return config.getProperty(key, config.getSourceType().name()); - } - - @RequestMapping(path = "/value", method = {RequestMethod.GET, RequestMethod.POST}) - public String value() { - return null; - } - -} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties deleted file mode 100644 index 777f1f0682fc8026268aa7094bdc75b8bbfd5e19..0000000000000000000000000000000000000000 --- a/src/main/resources/application-dev.properties +++ /dev/null @@ -1,3 +0,0 @@ - -eureka.instance.hostname=localhost -eureka.client.serviceUrl.defaultZone=http://localhost:${server.port}/eureka/ \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0d0ec467457df67e9d363b94b27728ed5f777885..1506e05ffc29631e1274e0c1e2579f59a7de68e9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,8 @@ spring: application: name: eureka-server + profiles: + active: apollo-env.properties server: port: 8761 servlet: @@ -8,17 +10,13 @@ server: app: id:evonate-newretail-eureka -spring: - profiles: - active: apollo-env.properties - #表示是å¦å°†è‡ªå·±æ³¨å†Œåˆ°Eureka Server上,默认为true eureka: client: registerWithEureka: false #表示是å¦ä»ŽEureka Serverä¸ŠèŽ·å–æ³¨å†Œä¿¡æ¯ï¼Œé»˜è®¤ä¸ºtrue fetchRegistry: false - serviceUrl: + serviceUrl: defaultZone: http://localhost:${server.port}/register/eureka/ instance: hostname: localhost