Not Working IntelliJ Spring Boot Initializr DemoWeb
已回答
Hello.
I just created a new project:
-------
Spring Initializr --> Packaging=War --> Java 1.8 -->
Dependencies: Web
Spring Boot 1.5.7
-------
then I just tried to run automatically created by IntelliJ configuration "DemoApplication"
I watched two possible strange behaviors IntelliJ:
1) Error: Could not find or load main class com.example.demo.DemoApplication
see screenrecord https://youtu.be/UrIz0v5FrgU
2) After manual build project by maven, automatically created by IntelliJ configuration "DemoApplication" finally starts Spring, but shutdown immediately.
see screenrecord https://youtu.be/KAtl10gRuRg
As you can see from the screenrecords, Maven has no problem with the project's build, nor does it run.
====
IntelliJ IDEA 2017.2.5
Build #IU-172.4343.14, built on September 26, 2017
Licensed to Aleksey Baranov
You have a perpetual fallback license for this version
Subscription is active until September 8, 2018
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
Build #IU-172.4343.14, built on September 26, 2017
Licensed to Aleksey Baranov
You have a perpetual fallback license for this version
Subscription is active until September 8, 2018
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
请先登录再写评论。
>1) Error: Could not find or load main class com.example.demo.DemoApplication
Make sure importing from Maven process has completed successfully for the new project: check that all the dependencies have been configured in Dependencies tab for the module.
Check with 3rd plugins disabled.
Post full idea.log output from IDE restart until reproducing the issue if problem remains.
>2) After manual build project by maven, automatically created by IntelliJ configuration "DemoApplication" finally starts Spring, but shutdown immediately.
Please see the https://youtrack.jetbrains.com/issue/IDEA-141591#comment=27-1016781 , https://youtrack.jetbrains.com/issue/IDEA-141591#comment=27-1116321 about the cause and workarounds.