【发布时间】:2020-05-21 15:49:47
【问题描述】:
我有一个简单的 Spring Boot 应用程序,我正在尝试在其上运行 Eureka 服务器。
这是我的主要应用程序文件。
@SpringBootApplication
@EnableEurekaServer
public class NetflixEurekaNamingServerApplication {
public static void main(String[] args) {
SpringApplication.run(NetflixEurekaNamingServerApplication.class, args);
}
}
这是我的应用程序属性文件
spring.application.name=netflix-eureka-naming-server
server.port=8761
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
使用的依赖项。
spring boot version : 2.2.4.RELEASE
spring cloud version : Hoxton.SR1
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
但是当我运行应用程序并访问 localhost:8761 时,我收到一个显示 404 NOT FOUND 的 Whitelabel 页面错误。
当我根据这篇帖子更改配置时unable to render eureka dashboard
然后它开始向我显示一个 XML 页面而不是仪表板。
有人可以帮我吗?
【问题讨论】:
-
日志中的内容是什么?
-
如果您的意思是应用程序日志,那么应用程序成功启动,没有任何错误我可以看到“已启动 eureka 服务器”和“应用程序已启动”日志
标签: java spring-boot netflix-eureka