3

I am trying to run a spring boot application in intellij 2020.1.1 idea by first generating from spring initializer in start.spring.io then open it with intellij. But when I try the application it doesn't have any output. run spring boot

Can anyone help me with this? Is this a problem of windows defender?

3 Answers 3

4
  • Try opening the project using the pom.xml file (instead of the project map). File > Open... > select pom.xml
  • Trust the project when asked.
  • Run maven when recognized as a maven build. (Right now there is no maven tab on the right.)
  • When the maven build is recognized a *.iml will be created and a project configuration will be added to your configurations.
  • Now you can just press 'run' at the top (or press shift + F10)

Tip: you can also just drag and drop pom files on the start screen and it will open the project.

Sign up to request clarification or add additional context in comments.

2 Comments

How do I open a project using pom.xml file? can you elaborate more?
1: Open IntelliJ IDEA. 2: Click File > Open. 3: Select the pom.xml file. 4: Click Open. 5: Choose Open as Project. IntelliJ will recognize it as a Maven project and import it automatically.
4

Click on the run button in Main Class. It will automatically start your project. It worked for me.

Comments

0

To run a spring boot application, you click the button when you have your main class (class with main method) in focus. However it is not so often I got this open, so you can set the IDE to run it automatically when you press run. Here is how.

  1. Click on the button in the top stating "current file" and select the option "Edit Configurations..."

    enter image description here

  2. Press the "+" button and select "Application", to make a new application configuration.

    enter image description here

  3. Give your run configuration a name and then click on the main class field, to select your main class.

    enter image description here

  4. Select you main class and press ok to all dialogs.

    enter image description here

You can now press the run button or use the shortcut keys to run your application.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.