Idea - Spring Boot - MVC 出现This application has no explicit mapping for /error, so you are seeing th
2017-11-02 17:05
1226 查看
场景
项目之前在 Myeclipse,采用 Spring Boot + Maven,一切正常,切换到 Idea 后,访问 Controller,方法是进去执行了,但是在 return 后就报错了,网络上查询方法有如下修改配置文件
spring.mvc.view.prefix: /WEB-INF/jsp/ spring.mvc.view.suffix: .jsp
修改为
spring.view.prefix=/WEB-INF/jsp/ spring.view.suffix=.jsp
主程序必须继承SpringBootServletInitializer,并且放在所有子包外面
添加依赖
<dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency>
上述的方法对我都没有效果
最后一个想法让我想起之前遇到的问题之前的问题
所以将依赖改为
<dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <version>9.0.1</version> </dependency>
终于正常了
相关文章推荐
- spring-boot启动报错:This application has no explicit mapping for /error, so you are seeing this as a fal
- Springboot启动后报错【This application has no explicit mapping for /error, so you are seeing this as a fallback····】
- Spring Whitelabel Error Page: This application has no explicit mapping for /error, so you are seeing
- 异常: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.
- SpringB异常: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.
- 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
- 搭建Spring Boot框架 Whitelabel Error Page This application has no explicit mapping for /error, so you ar
- SpringBoot报错:Whitelabel Error Page This application has no explicit mapping for /error, so you are s
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for(转)
- spring-boot启动报错【This application has no explicit mapping for /error.....】
- Spring Boot 报错Wihtelabel Error Page: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.....】