Eureka服务注册中心
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
spring:
application:
name: regist
eureka:
client:
# 单机不需要拉取注册信息
fetch-registry: false
# 单机不需要注册自己
registerWithEureka: false
server:
port: 10086
@SpringBootApplication
@EnableEurekaServer
public class RegistApplication {
public static void main(String [] args){
SpringApplication.run(RegistApplication.class, args);