Spring Cloud构建微服务架构(一)——服务注册与发现

This commit is contained in:
程序猿DD
2016-05-31 21:56:19 +08:00
parent 469798e649
commit 7da6df8061
4 changed files with 26 additions and 37 deletions
@@ -4,8 +4,8 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
@SpringBootApplication
public class ComputeServiceApplication {
public static void main(String[] args) {
@@ -0,0 +1,6 @@
spring.application.name=compute-service
server.port=2222
eureka.client.serviceUrl.defaultZone=http://localhost:1111/eureka/
@@ -1,15 +0,0 @@
# Spring properties
spring:
application:
name: compute-service
# HTTP Server
server:
port: 2222 # HTTP (Tomcat) port
# Discovery Server Access
eureka:
client:
serviceUrl:
defaultZone: http://localhost:1111/eureka/