java - Spring eureka 仪表板在 wildfly 上返回 XML

标签 java spring-boot wildfly netflix-eureka

我正在尝试在 wildfly 上部署我的 eureka 服务,但是当我尝试访问仪表板时,我得到以下 xml 作为响应:

<com.netflix.eureka.util.StatusInfo>
<generalStats>
<environment>test</environment>
<num-of-cpus>4</num-of-cpus>
<total-avail-memory>3525mb</total-avail-memory>
<current-memory-usage>736mb (20%)</current-memory-usage>
<server-uptime>00:01</server-uptime>
</generalStats>
<applicationStats>
<registered-replicas>http://localhost:8761/eureka/</registered-replicas>
<available-replicas/>
<unavailable-replicas>http://localhost:8761/eureka/,</unavailable-replicas>
</applicationStats>
<instanceInfo>
<instanceId>note:eureka-service:8761</instanceId>
<hostName>note</hostName>
<app>EUREKA-SERVICE</app>
<ipAddr>192.168.1.36</ipAddr>
<status>UP</status>
<overriddenstatus>UNKNOWN</overriddenstatus>
<port enabled="true">8761</port>
<securePort enabled="false">443</securePort>
<countryId>1</countryId>
<dataCenterInfo class="com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo">
<name>MyOwn</name>
</dataCenterInfo>
<leaseInfo>
<renewalIntervalInSecs>30</renewalIntervalInSecs>
<durationInSecs>90</durationInSecs>
<registrationTimestamp>0</registrationTimestamp>
<lastRenewalTimestamp>0</lastRenewalTimestamp>
<evictionTimestamp>0</evictionTimestamp>
<serviceUpTimestamp>0</serviceUpTimestamp>
</leaseInfo>
<metadata class="java.util.Collections$EmptyMap"/>
<homePageUrl>http://note:8761/</homePageUrl>
<statusPageUrl>http://note:8761/info</statusPageUrl>
<healthCheckUrl>http://note:8761/health</healthCheckUrl>
<vipAddress>eureka-service</vipAddress>
<secureVipAddress>eureka-service</secureVipAddress>
<isCoordinatingDiscoveryServer>false</isCoordinatingDiscoveryServer>
<lastUpdatedTimestamp>1491796603178</lastUpdatedTimestamp>
<lastDirtyTimestamp>1491796615476</lastDirtyTimestamp>
</instanceInfo>
</com.netflix.eureka.util.StatusInfo>

有谁知道如何在 wildfly 上部署仪表板?

最佳答案

就我而言,其他两个解决方案没有帮助。

我搜索了几个小时,在调试 spring 代码时找到了解决方案。 freemarker 的 viewResolver 未在 spring-cloud-netflix-eureka-server-1.3.1.RELEASE.jar 中找到模板。

事实上,我只需要设置一个简单的属性就可以完成任务:

spring.freemarker.prefer-file-system-access=false

关于java - Spring eureka 仪表板在 wildfly 上返回 XML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43314822/

相关文章:

java - 如果二维数组中存在数字零,则将其归零

spring-boot - 无法在插件之前设置变量{}

java - Spring Boot + Spring Data JPA + H2 :Error creating bean with name 'entityManagerFactory' defined in class path resource

jboss - 使用 Wildfly 10 配置 Ehcache

java - 从泛型参数的构造函数中获取对象类型?

java - Android 2.3 设备上的 USB 主机开发

java - 如何在执行JAR时外部向spring boot提供mysql主机

http - 野蝇服务器 :Partial Content and Range Requests

java - 如何将引用的项目部署到 JBoss 上?

java - Selenium 等待 AJAX 响应