springcloud-服务注册Eureka Client
1.版本说明
springboot 2.2.5.RELEASE
springcloud Hoxton.SR6
2.依赖
<!--引入 eureka client--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency>
3.配置文件
server.port=8081 spring.application.name=eurekaclient eureka.client.service-url.defaultZone=http://localhost:8080/eureka
4.启动注解
@SpringBootApplication @EnableEurekaClient public class EurekaclientApplication { public static void main(String[] args) { SpringApplication.run(EurekaclientApplication.class, args); } }