Spring Cloud构建微服务架构(一)——服务注册与发现
This commit is contained in:
+1
-1
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user