《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for
来源:互联网 发布:ubuntu wget安装 编辑:程序博客网 时间:2024/05/22 01:39
Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Tue Mar 28 22:25:43 CST 2017There was an unexpected error (type=Internal Server Error, status=500).Circular view path [login]: would dispatch back to the current handler URL [/login] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
首先,这个出错页面是SpringBoot的一个默认出错页面。源码在:org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration 第151行。
这种错误一般是配置错误,或者MVC报错引起的错误。
比如说,在newer versions of Spring, following needs to be put in application.properties file:
spring.mvc.view.prefix=/WEB-INF/jsp/spring.mvc.view.suffix=.jsp
Also, JSP files need to be put under src/main/resources/META-INF/resources/WEB-INF/jsp
推荐直接使用java代码配置的方式,这样方便看代码:
package com.restfiddle.config;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;/** * Created by jack on 2017/3/28. * * @author jack * @date 2017/03/28 */@Configurationpublic class WebMvcConfig extends WebMvcConfigurerAdapter { @Override public void configureViewResolvers(ViewResolverRegistry registry) { //spring.view.prefix=/WEB-INF/jsp/ //spring.view.suffix=.jsp registry.jsp("/WEB-INF/jsp/", ".jsp"); //registry.freeMarker(); //registry.velocity(); //registry.groovy(); }}
问题参考:
http://stackoverflow.com/questions/27113452/circular-view-path-in-a-simple-spring-boot-project-with-a-controller
阅读全文
0 0
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for
- SpringBoot启动报错【This application has no explicit mapping for /error.....】
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- springboot访问页面报错:This application has no explicit mapping for /error, so you are seeing this as a fa
- spring boot报错:this application has no explicit mapping for /error...
- Spring Boot报错:This application has no explicit mapping for /error......
- SpringBoot报错Whitelabel Error Page
- spring-boot启动报错:This application has no explicit mapping for /error, so you are seeing this as a fal
- Spring-boot 报错This application has no explicit mapping for /error, so you are seeing this as a fallb
- Springboot 入门级报错Whitelabel Error Page This application
- This application has no explicit mapping for /error, so you are seeing this as a fallback.
- This application has no explicit mapping for /error, so you are seeing this as a fallback
- This application has no explicit mapping for /error, so you are seeing this as a fallback
- 六条“黑客伦理”(hacker ethic)
- 黑客的价值观
- 《Springboot极简教程》SpringBoot plus Mongodb开发企业级restfeel接口测试平台
- wait-notify 实现多线程交叉备份
- Myeclipse2015把web项目添加至tomcat中,添加列表中却没有想要添加的项目
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for
- 《Springboot极简教程》问题解决:javax.servlet.ServletException: Circular view path [login]: would dispatch back to the current handler URL
- 原声JS判断程序运行平台Pc OR Mobile
- 《Springboot极简教程》继承WebMvcConfigurerAdapter: 一行代码写Controller
- LeetCode 105. Construct Binary Tree from Preorder and Inorder Traversal
- 搭建Maven(搭建+问题笔记)
- 《Springboot极简教程》问题解决:Idea解决Gradle库依赖冲突问题:Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting
- 传递WinMain的参数给main
- 《Springboot极简教程》问题解决:org.apache.catalina.LifecycleException: A child container failed during start