启动 SpringBoot 返回 Whitelabel Error Page 错误

来源:13-2 SpringBoot的搭建与启动

姜岑

2020-03-03

配置好了 SpringBoot, 之前出现 dataSource 的错误, 使用 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) 解决成功.
图片描述
访问 hello 也成功
配置 application.properties 后访问失败, 得到 Whitelabel Error Page , 将application.properties 中的配置删除后再访问还是出现下面的错误 :
图片描述
Hello 的路由配置也没问题
图片描述
IDEA 上也显示成功启动了, 实在是有点迷 :

2020-03-03 23:12:11.928  WARN 34565 --- [           main] o.s.boot.StartupInfoLogger               : InetAddress.getLocalHost().getHostName() took 5005 milliseconds to respond. Please verify your network configuration (macOS machines may need to add entries to /etc/hosts).
2020-03-03 23:12:16.936  INFO 34565 --- [           main] com.imooc.booto2o.Booto2oApplication     : Starting Booto2oApplication on MacBook-Pro.local with PID 34565 (/Users/mac/IdeaProjects/booto2o/target/classes started by mac in /Users/mac/IdeaProjects/booto2o)
2020-03-03 23:12:16.937  INFO 34565 --- [           main] com.imooc.booto2o.Booto2oApplication     : No active profile set, falling back to default profiles: default
2020-03-03 23:12:18.533  INFO 34565 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2020-03-03 23:12:18.545  INFO 34565 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-03-03 23:12:18.545  INFO 34565 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.31]
2020-03-03 23:12:18.660  INFO 34565 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-03-03 23:12:18.661  INFO 34565 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1679 ms
2020-03-03 23:12:18.883  INFO 34565 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-03-03 23:12:19.134  INFO 34565 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2020-03-03 23:12:19.138  INFO 34565 --- [           main] com.imooc.booto2o.Booto2oApplication     : Started Booto2oApplication in 17.754 seconds (JVM running for 23.971)
2020-03-03 23:12:24.740  INFO 34565 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-03-03 23:12:24.740  INFO 34565 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-03-03 23:12:24.751  INFO 34565 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 11 ms

麻烦老师看一下

写回答

3回答

翔仔

2020-03-04

同学好,这种环境的问题我也没办法精确定位,可以尝试推倒重来试试,反正也只是在创建工程的阶段

0
0

纯情的慕哥

2020-03-03

“配置 application.properties 后访问失败, 得到 Whitelabel Error Page , 将application.properties 中的配置删除后再访问还是出现下面的错误 :”

这个实在是很奇怪

重新开工程干吧。如果帮到你,望采纳

2
1
姜岑
我也觉得, 真的是啥错误都碰得到. 吸铁磁
2020-03-03
共1条回复

苏涛71797

2020-03-12

我也遇到了,解决没哇

0
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程