Run Spring-boot's main using IDE

前端 未结 9 1945
灰色年华
灰色年华 2020-11-30 01:51

I have a spring-boot application that needs to:

  • Be deployable as a war in a servlet container
  • Be runnable via `mvn spring-boot:run``

I\

9条回答
  •  迷失自我
    2020-11-30 02:32

    I had the same problem using IntelliJ 2018. Initially, Make sure that you have added the maven library for the spring project in your IntelliJ.

    My solution is:

    1. Go to Run -> Edit Configurations.

    2. Select Application && choose your current project.

    3. Check Include dependencies with "Provided" scope.

    4. OK -> RUN

提交回复
热议问题