请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

启动 SpringBoot 返回 Whitelabel Error Page 错误

配置好了 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回答

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

0 回复 有任何疑惑可以回复我~
纯情的慕哥 2020-03-03 23:28:42

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

这个实在是很奇怪

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

2 回复 有任何疑惑可以回复我~
  • 提问者 姜岑 #1
    我也觉得, 真的是啥错误都碰得到. 吸铁磁
    回复 有任何疑惑可以回复我~ 2020-03-03 23:34:26
苏涛71797 2020-03-12 22:50:47

我也遇到了,解决没哇

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信