Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I wrote an example and found that the program exited without an event loop after execution #3

Open
bambuo opened this issue Jul 22, 2024 · 1 comment

Comments

@bambuo
Copy link

bambuo commented Jul 22, 2024

pom.xml

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.3.2</version>
</parent>

<properties>
    <maven.compiler.source>21</maven.compiler.source>
    <maven.compiler.target>21</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.smartboot.servlet/smart-servlet-spring-boot-starter -->
    <dependency>
        <groupId>org.smartboot.servlet</groupId>
        <artifactId>smart-servlet-spring-boot-starter</artifactId>
        <version>1.5</version>
    </dependency>
</dependencies>

Main.java

@SpringBootApplication
public class Main {
    public static void main(String[] args) {
        SpringApplication.run(Main.class,args);
    }
}

results of enforcement

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.0)

2024-07-22T15:55:57.784+08:00  INFO 17712 --- [           main] cn.krado.Main                            : Starting Main using Java 21.0.2 with PID 17712 (D:\Codes\gitee\playground-java\hello-smart\target\classes started by dtai in D:\Codes\gitee\playground-java)
2024-07-22T15:55:57.786+08:00  INFO 17712 --- [           main] cn.krado.Main                            : No active profile set, falling back to 1 default profile: "default"
2024-07-22T15:55:58.288+08:00  INFO 17712 --- [           main] cn.krado.Main                            : Started Main in 0.774 seconds (process running for 1.188)
Disconnected from the target virtual machine with address' 127.0.0.1:60210 'and transmission:' socket '
@smthing
Copy link
Contributor

smthing commented Jul 24, 2024

springboot版本太高了,试下降低版本。

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.18</version>
</parent>

springboot3也在适配中了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants