java – How to run a spring boot app in intellij?
Be sure to open the pom.xml and not the folder. IntelliJ will ask if you want to import as a project. Answer yes to this question.
You can always right-click on the pom.xml and choose Maven->Reimport which will do the classpath for you automatically.
Then you go to the main class from the tree and right-click and choose Run. That should create a temporary configuration in your run configurations.
The rest you can find here:
If you want to run as a maven project, go with this:
If you want to run from terminal as java jar, when you have built your spring-boot-jar press CTRL+TAB+T (to activate terminal) and type in the terminal:
java -jar target/yourjar.jar