2021年3月17日星期三

Spring Boot 2.4.3 application immediately shuts down after starting

Tools:

  • Sprint Boot 2.4.3
  • IntelliJ IDEA 2020.3.3 Community Edition
  • Java 15.0.2

I just create a demo project by using Spring Assistant and just turn on Spring Web dependency, the pom.xml also has

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

When I run the DemoApplication.java, application immediately shuts down after starting, not print anything about server or port:

2021-03-18 09:17:38.398  INFO 8553 --- [           main] com.example.demo.DemoApplication         : Starting DemoApplication using Java 15.0.2 on Summoring-MBP.local with PID 8553 (/Users/Smeegol/Git/demo2/target/classes started by Smeegol in /Users/Smeegol/Git/demo2)  2021-03-18 09:17:38.403  INFO 8553 --- [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default  2021-03-18 09:17:40.286  INFO 8553 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 3.424 seconds (JVM running for 4.374)    Process finished with exit code 0  

How can I make the web server running and listening port like 8080 after application started? Thanks.

Source code can be downloaded from here: https://github.com/Smeegol/SpringBootDemo/blob/main/demo.zip

https://stackoverflow.com/questions/66683657/spring-boot-2-4-3-application-immediately-shuts-down-after-starting March 18, 2021 at 09:48AM

没有评论:

发表评论