whitelabel错误页

xxhby3vn  于 2021-07-26  发布在  Java
关注(0)|答案(0)|浏览(213)

我试着实现基本的spring启动应用程序,但是localhost:8080/,我得到一个白色标签错误页。
从创建我的项目https://start.spring.io/ (maven项目、java8、jar、springboot2.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/ 应该给我一个“欢迎”,但我有这个白标签错误,你知道如何解决这个问题吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题