SpringBoot启动项目之后,访问页面出现Whitelabel Error Page

话说万事具备,只欠东风~

   蹭闲暇时来跑个SpringBoot项目玩玩,把一切配置依赖准备就绪之后打算运行项目。

   Staring......   

   接着,在浏览器输入地址 localhost:8080/hello

   很惊讶的看见

   Whitelabel Error Page

      This application has no explicit mapping for /error, so you are seeing this as a fallback.

      Sat Jan 18 22:33:51 CST 2020
      There was an unexpected error (type=Not Found, status=404).
      No message available
  
   然后立即检查自己的地址是不是写错了

  发现地址是对的呀,怎么还出现地址错误呢?

  然后,又重新去检查了一边才发现自己的HelloController类和SprintBoot的启动类不在同一个目录下面。

  

扫描二维码关注公众号,回复: 8694016 查看本文章

 正常的应该是这样

  只怪不小心在建包的时候把包的位置弄错了

  修改之后就能在浏览器中正常显示我们的信息啦~

  hello world !

猜你喜欢

转载自www.cnblogs.com/jhtian/p/12210646.html