简体   繁体   English

为什么我会看到白标错误页面以及如何解决它

[英]Why do i get whitelabel error page and how to resolve it

Whitelabel error occouring each time i hit localhost.每次我点击本地主机时都会出现白标错误。 How to resolve the error and move application further如何解决错误并进一步移动应用程序

Create a controller mapping for "/error" by implementing ErrorController.通过实现 ErrorController 为“/error”创建控制器映射。

@RestController
public class WelcomeController implements ErrorController{

    private static final String PATH = "/error";

    @RequestMapping(value = PATH)
    public String error() {
        return "Error";
    }

    @Override
    public String getErrorPath() {
        return PATH;
    }
}

通过将server.error.whitelabel.enabled设置为false来尝试application.properties文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我收到错误 WhiteLabel 错误页面 - Why I get the Error WhiteLabel Error Page 白标错误页面 - 如何解决此问题 - Whitelabel Error Page - how to resolve this 为什么我在运行简单的 Spring Boot 应用程序时总是得到状态为“404”的 Whitelabel 错误页面 - Why do I always get Whitelabel Error Page with status "404" while running a simple Spring Boot Application 为什么我在运行 Spring 启动项目时总是得到状态为“404”的 Whitelabel 错误页面 - Why do I always get Whitelabel Error Page with status “404” while running Spring Boot Project SPRING - 我得到的是 Whitelabel 错误页面而不是我的家,为什么? - SPRING - I get the Whitelabel Error Page instead of my home, why? 如何解决 Spring Boot 应用程序中与“Whitelabel Error Page”相关的问题 - How to resolve the problem related to "Whitelabel Error Page" in a Spring Boot application Spring Boot - 无法解决白标签错误页面 - Spring Boot - Unable to resolve Whitelabel Error Page 如何修复 spring 框架上的“Whitelabel 错误页面”- GET 请求不起作用 - How to fix "Whitelabel Error Page" on spring framework - GET request is not working springboot whitelabel错误页面,怎么办? - springboot whitelabel error page, what to do? Springboot Whitelabel 错误页面,状态为 404:无法解析 JSP 的路径 - Springboot Whitelabel Error Page with status 404: unable to resolve path of JSP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM