【问题标题】:How to override the "No web page was found for the web address" message?如何覆盖“未找到该网址的网页”消息?
【发布时间】:2018-05-10 13:14:11
【问题描述】:

“没有为网址找到网页:https://localhost/blabla” 消息是作为对具有非法路径的请求的响应而生成的。我需要返回一条自定义消息而不是这条消息。知道怎么做吗?

服务器是嵌入Tomcat的

spring-boot-starter-tomcat-1.3.3.RELEASE.jar
spring-webmvc-4.2.5.RELEASE.jar

【问题讨论】:

    标签: java spring security spring-boot tomcat


    【解决方案1】:

    您可以更新httpd.conf 并指向新页面maintenance.html(随便称呼它)并将其放置在可以访问的地方。

    // comment anything existing add line below
    ErrorDocument 503 /maintenance.html
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-05
      • 2020-12-05
      • 2018-05-31
      • 1970-01-01
      • 2011-08-04
      相关资源
      最近更新 更多