I’m switching from Eclipse to IntelliJ CE 2024.3.1.1 (but onestly after 10 minutes of usage I’m changing idea)
and I opened a SpringBoot 3.4.1
project create with Spring Initliazr.
As I said, I’m using Spring Boot 3.4.1
, Java 21
, there isn’t a line of code! I have just some import:
- spring-boot-starter-data (H2 database),
- spring-boot-starter-web,
- h2database,
- lombok (1.18.12)
this is the behavior of the leading IDE for Java and Kotlin (They said…):
If I perform clean install
from the IDE maven configuration -> everything goes fine
If I perform clean package
from the IDE maven configuration -> everything goes fine
If START my webapp as application from the IDE Run/Debug configuration -> App Start and Shutdown fine (this is the only way to debug the application)
If I perform spring-boot:run
from the IDE maven configuration -> Application Starts correctly (as I can see on the log) but when I click the shut down button it returns this error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.574 s
[INFO] Finished at: 2024-12-24T22:07:34+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.4.1:run
(default-cli) on project rest-api-web: Process terminated with exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the
following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I obtain the same behavior if I perform spring-boot:start
Adding spring-boot-devtools
is useless: regardless of how the app is started – when I change something – it doesn’t reload.
Finally I see all my application.properties
directive gray… and the file is not recognized as Spring configuration file even if I had installed the Spring Assistant
plugin.
Why do I get these errors if I try to start the application with maven (3.9.9. Bundled)? The Spring Assistant
plugin works only with .yaml
files? Or did I do something wrong?