eureka环境搭建好后,访问管理页面,没有传说中的管理页面,而是出现了没有渲染的xml数据。经过半天的网上查找方案,终于解决。再次记录如下:
1.最开始,找到了一个博客“http://blog.csdn.net/l5764773160/article/details/77483730”,他的解决方案是:
将项目中依赖的freemarker-2.3.25-incubating.jar版本从本地maven仓库中删除,再maven update 项目。
问题解决
2.社区里另个一解决方案:“https://stackoverflow.com/questions/43314822/spring-eureka-dashboard-returns-xml-on-wildfly”,有个人的回答是:
“freemarker的viewResolver没有在spring-cloud-netflix-eureka-server-1.3.1.RELEASE.jar中找到模板”
于是,在application.yml文件中,增加
spring: freemarker: prefer-file-system-access: false
这个解决不了我的问题,但可能能解决你的
分析:此问题出现可能跟spring cloud 版本有关。