简体   繁体   中英

Cant run spring boot application?

I'm working on an assignment with a team. And my team decided to use spring boot for the application. However for some reason whenever I run the application I get a different message on my terminal whereas my teammates have a different message on their terminal. Instead of "LiveReload server is running on port 35729" They get "tomcat initialized with port(s) 8081 (http)".

I am not sure what exactly to do since all of us are using the same project and I have built it as they told me to do so.

However it is still not working for me. Can anybody tell me how to fix it so I could get it to run. I have never used maven or spring boot before.

This is the message I am getting on my terminal

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

Thank you so much.

It seems you have spring-boot-devtools dependency in the classpath. Because of this you see LiveReload server is running on port 35729 statement written to log.

From your logs, it seems tomcat is not started at all. Verify your properties files and make sure web environment is not turned off

  • For spring-boot 1.x, look for spring.main.web-environment=false property
  • For spring-boot 2.x, look for spring.main.web-application-type=none property

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM