我在和一个团队一起做任务。我的团队决定在应用程序中使用spring引导。然而,由于某种原因,每当我运行应用程序时,我在我的终端上得到了不同的消息,而我的队友在他们的终端上有不同的消息。而不是"LiveReload服务器在端口35729上运行“,而是”使用端口8081 (Http)初始化tomcat“。
我不知道该怎么做,因为我们都在使用同一个项目,我已经按照他们的要求建造了这个项目。
然而,它仍然对我不起作用。有人能告诉我怎么修吗这样我才能让它运行。我以前从未使用过maven或弹簧靴。
这是我在终端机上收到的信息
2020-06-13 23:05:35.538 INFO 34396 --- [ restartedMain] com.rest.WebApplication : Starting WebApplication on DESKTOP-1M4A445 with PID 34396 (Directory\project\target\classes started by USER in Directory/project)
2020-06-13 23:05:35.543 INFO 34396 --- [ restartedMain] com.rest.WebApplication : No active profile set, falling back to default profiles: default
2020-06-13 23:05:35.609 INFO 34396 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-06-13 23:05:36.520 INFO 34396 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2020-06-13 23:05:36.550 INFO 34396 --- [ restartedMain] com.rest.WebApplication : Started WebApplication in 1.452 seconds (JVM running for 2.035)
Process finished with exit code 0
非常感谢。
发布于 2020-06-13 14:18:07
在类路径中似乎有spring-boot-devtools
依赖项。正因为如此,您将看到写入日志的LiveReload server is running on port 35729
语句。
从您的日志来看,tomcat似乎根本没有启动。验证您的属性文件,并确保web环境没有关闭。
spring.main.web-environment=false
propertyspring.main.web-application-type=none
propertyhttps://stackoverflow.com/questions/62360312
复制相似问题