springboot搭建的时候启动项目,访问localhost:8080/index会发现没有得到想要的页面,而是出现了这个玩意儿
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sun Oct 20 16:01:02 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available
不知道原因的时候很是头疼,怎么会出现这个页面,是我的代码写错了吗(可是我都是按照教程一步步来的啊),是我缺少什么配置吗。。。反正就是一脸萌比。
其实就是在controller里面没有配置@RequestMapping("/index")
请求路径。