Search code examples
springspring-mvcintellij-idea

Running a Spring MVC program in Intellij


I am a past Eclipse user and been using Intellij for 2 months on. However I am only been using it for Spring-Boot apps. I decided to make a fun Spring MVC app and I cannot figure out how to get it to deploy and run on my tomcat server. For spring boot it is pretty simple.

I was hoping someone could help me out with this.

enter image description here

The above picture show my options. I am using Intellij 14 full version if that matters.

Hope to hear from someone soon.


Solution

  • You need to create a configuration for your Tomcat Server first.

    Here's a screenshot for where to find it.

    If you don't see TomcatServer option when you try to create a configuration, you might need to enable Tomcat and TomEE Integration Plugin first by going to File -> Settings -> Plugins.

    After you create a configuration for your server, you should be able to see options to run your spring application in the server.

    You may also modify/configure how to run your app in the Deployment tab in your Tomcat configuration.