小编Moh*_*adi的帖子

Netflix尤里卡客户端微服务未注册尤里卡服务器

我正在尝试向尤里卡服务器注册我的微服务。但它显示浏览器中没有可用的实例。我在控制台中没有收到任何错误。请帮我解决这个问题。

我已经通过在谷歌上搜索尝试了多种选择。尽管如此,我还是无法解决这个问题。

微服务应用程序.properties

  spring.application.name=jecreations-core
  eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
  eureka.client.register-with-eureka=true
Run Code Online (Sandbox Code Playgroud)

客户端主类

 @EnableEurekaClient
 @SpringBootApplication
 @EnableConfigurationProperties(ImageProperties.class)
 public class JecreationsApplication extends SpringBootServletInitializer{
public static void main(String[] args) {
    SpringApplication.run(JecreationsApplication.class, args);
}
 }
Run Code Online (Sandbox Code Playgroud)

Eureka Server application.properties

   eureka.client.register-with-eureka=false
   eureka.client.fetch-registry=false
   server.port=8761
   spring.application.name=DiscoveryServer
Run Code Online (Sandbox Code Playgroud)

Eureka 服务器主类。

 @SpringBootApplication
 @EnableEurekaServer
 public class JeeurekaApplication extends SpringBootServletInitializer{

public static void main(String[] args) {
    SpringApplication.run(JeeurekaApplication.class, args);
}

}
Run Code Online (Sandbox Code Playgroud)

java spring-boot netflix-eureka

0
推荐指数
1
解决办法
3792
查看次数

标签 统计

java ×1

netflix-eureka ×1

spring-boot ×1