基本springboot应用程序上的whitelabel错误页面

时间:2020-06-09 08:59:54

标签: java spring spring-boot maven tomcat

我尝试实现基本的Spring Boot应用程序,但是当进入localhost:8080 /时,出现白标签错误页面。

https://start.spring.io/(Maven项目,java 8,jar,spring boot 2.3.0)创建了我的项目,并将其导入了eclipse。

在pom.xml中,

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

运行mainapp.java(在src.main.java.project.projectname中)时,它似乎可以正常运行

 :: Spring Boot ::        (v2.3.0.RELEASE)

2020-06-09 10:50:14.138  INFO 3772 --- [           main] academy.demo173.Demo173Application       : Starting Demo173Application on ITEM-S89822 with PID 3772 (HIDDEN)
2020-06-09 10:50:14.140  INFO 3772 --- [           main] academy.demo173.Demo173Application       : No active profile set, falling back to default profiles: default
2020-06-09 10:50:14.801  INFO 3772 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2020-06-09 10:50:14.810  INFO 3772 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-06-09 10:50:14.810  INFO 3772 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.35]
2020-06-09 10:50:14.915  INFO 3772 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-06-09 10:50:14.915  INFO 3772 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 741 ms
2020-06-09 10:50:15.031  INFO 3772 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2020-06-09 10:50:15.151  INFO 3772 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2020-06-09 10:50:15.158  INFO 3772 --- [           main] academy.demo173.Demo173Application       : Started Demo173Application in 1.237 seconds (JVM running for 1.993)
2020-06-09 10:50:23.755  INFO 3772 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-06-09 10:50:23.755  INFO 3772 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-06-09 10:50:23.759  INFO 3772 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 4 ms

localhost:8080 /应该给我一个“欢迎”,但是我却遇到了这个Whitelabel错误,知道如何解决这个问题吗?

0 个答案:

没有答案