You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法访问Eureka控制台,出现白标错误页求助排查

问题原因及解决方案

核心问题:Spring Boot与Spring Cloud版本不兼容

你使用的Spring Boot 3.1.3属于Spring Boot 3.x系列,而配置的Spring Cloud版本2020.0.4仅适配Spring Boot 2.4.x ~ 2.5.x,版本不匹配导致Eureka Server无法正常初始化,控制台页面无法加载。

具体修复步骤

1. 升级Spring Cloud版本

修改父项目pom.xml中的spring-cloud.version为适配Spring Boot 3.x的稳定版本,推荐使用2022.0.4:

<properties>
    <java.version>17</java.version>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <spring-cloud.version>2022.0.4</spring-cloud.version>
</properties>

2. 移除不必要的Freemarker配置

你的application.properties中自定义的Freemarker模板路径会覆盖Eureka Server默认的模板位置,导致控制台页面无法找到,直接删除以下两行:

spring.freemarker.template-loader-path=classpath:/templates/
spring.freemarker.prefer-file-system-access=false

3. 验证修复结果

重新启动DiscoveryServerApplication,查看日志中是否出现Eureka相关初始化日志(比如Eureka Server is now ready to receive requests),启动完成后访问http://localhost:8761即可正常看到Eureka控制台。

内容的提问来源于stack exchange,提问作者Corvo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 19:45:31