smartboot / smart-servlet

https://smartboot.tech/smart-servlet/
GNU Affero General Public License v3.0
23 stars 4 forks source link

【Bug】Spring Boot 3 + JDK 21 启动直接停止!? #5

Open CodingOX opened 1 week ago

CodingOX commented 1 week ago

debug的启动日志

[xxx.log](https://github.com/user-attachments/files/17896320/xxx.log)

见附件

代码很简单,就一个Get请求:

@RestController
public class DemoController {

    @GetMapping("/")
    public String index() throws InterruptedException {
        TimeUnit.SECONDS.sleep(1);
        return "hello world";
    }
}

maven关键配置

... 省略 ...
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.3.5</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
... 省略 ...
   <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <!-- Exclude the Tomcat dependency -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.smartboot.servlet</groupId>
            <artifactId>smart-servlet-spring-boot-starter</artifactId>
            <version>1.5</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
smthing commented 1 week ago

版本太低了,最新版是2.4