我从下载了一个简单的SpringBoot应用程序v3.2.6
https://start.spring.io/
适用于Java版本17
当我尝试启动应用程序时,我看到以下输出,
12:17:42: Executing ':DemoApplication.main()'...
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :DemoApplication.main()
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.2.6)
2024-06-16T12:17:44.680+05:30 INFO 12032 --- [demo] [ main] com.example.demo.DemoApplication : Starting DemoApplication using Java 17.0.9 with PID 12032
2024-06-16T12:17:44.684+05:30 INFO 12032 --- [demo] [ main] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default"
2024-06-16T12:17:45.602+05:30 INFO 12032 --- [demo] [ main] com.example.demo.DemoApplication : Started DemoApplication in 1.432 seconds (process running for 1.802)
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD SUCCESSFUL in 2s
3 actionable tasks: 1 executed, 2 up-to-date
12:17:45: Execution finished ':DemoApplication.main()'.
通常,当我运行Springboot应用程序时,服务器在8080端口启动,然后我看到服务器启动消息,但在这种情况下,服务器没有启动,但构建成功,不确定我缺少了什么。