初学Spring Boot遇到Whitelabel Error Page的解决办法
2017-11-16 10:49
776 查看
import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @author 杨靖罡 * @date 2017年11月16日 * @purpose */ @Controller public class HelloSpringBootController { @RequestMapping("/hello") public String hello(){ return "Hello, SpringBoot!"; } }
W
@Controller注解的问题
这种情况下不适合使用controller注解,应该将@Controller换成@RestController 此时就可以正常在页面打印出Hello,SpringBoot!这里的情况是在没有页面的情况下遇到的问题,若有html/jsp时遇到Whitelable Error Page 则是模块的问题,去点击寻找答案。
相关文章推荐
- Spring Boot Whitelabel Error Page解决办法
- springboot + tomcat + jsp 报Whitelabel Error Page解决方法
- spring-boot jsp whitelabel error page问题解决
- Spring-Boot "Whitelabel Error Page" 解决方法总结
- 初学 Spring boot 报错 Whitelabel Error Page 404
- 初学 Spring boot 报错 Whitelabel Error Page 404
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for(转)
- spring-boot集成 jsp报whitelabel error page的问题解决
- 《Springboot极简教程》问题解决:Springboot启动报错 Whitelabel Error Page: This application has no explicit mapping for
- Spring Boot自定义错误页面,Whitelabel Error Page处理方式
- SpringBoot接口服务处理Whitelabel Error Page
- Spring boot启动提示Whitelabel Error Page 401 spring需要授权登录
- java处理springboot whitelabel error page
- SpringBoot中jsp页面调用iframe标签报Whitelabel Error Page 错误
- spring-boot Whitelabel Error Page
- spring boot: Whitelabel Error Page的解决方案
- Spring Boot : Whitelabel Error Page解决方案
- spring boot: Whitelabel Error Page的解决方案
- SpringBoot 不显示Whitelabel Error Page
- spring boot: Whitelabel Error Page的解决方案