question: When I start the spring boot appliction, the listening port does not take effect
version:
spring boot version : 3.0-M2
jdk version: 17 2021-09-14 LTS
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.0-M2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>boot3.0</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
logger:
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.0-M2)
2022-04-04 23:09:52.473 INFO 1484 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication using Java 17 on localhost with PID 1484 (/Users/jameszow/Documents/JavaWorkSpace/boot3.0/target/classes started by jameszow in /Users/jameszow/Documents/JavaWorkSpace/boot3.0)
2022-04-04 23:09:52.476 INFO 1484 --- [ main] com.example.demo.DemoApplication : The following 1 profile is active: "dev"
2022-04-04 23:09:52.960 INFO 1484 --- [ main] com.example.demo.DemoApplication : Started DemoApplication in 0.924 seconds (JVM running for 1.605)
Process finished with exit code 0
Comment From: Jzow
This is different from the version I used in 2.6. There is no program listening port at startup, and the service is not running normally
Comment From: bclozel
Did you mean to add the spring-boot-starter-web instead of spring-boot-starter?
With the latter, the behavior you're describing is expected.
Comment From: Jzow
@bclozel Thank you very much for your timely reply. I can use it normally after I join the web dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
In addition, I also want to know where to view the relatively large internal updates of 3.0 except replacing Jakarta and upgrading java version to 17.
Comment From: bclozel
You'll find information in the release notes.