Spring Cloud构建微服务架构(三)断路器
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.didispace;
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
|
||||
|
||||
@EnableEurekaServer
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(Application.class).web(true).run(args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
server.port=1111
|
||||
#eureka.instance.hostname=localhost
|
||||
|
||||
eureka.client.register-with-eureka=false
|
||||
eureka.client.fetch-registry=false
|
||||
eureka.client.serviceUrl.defaultZone=http://localhost:${server.port}/eureka/
|
||||
Reference in New Issue
Block a user