tomcatintellij-ideaprofile

How do I switch Tomcat profile in Intellij Run Configuration?


I imported a project with two profiles, dev and sit. When I run this project under local Tomcat server, it directly uses sit profile.

enter image description here

My Run Configuration in Intellij is shown as follows:

enter image description here

How do I switch to dev profile in Intellij?


Solution

  • Create a new Maven configuration, and type dev into profiles. Then, in the Before launch tab of Tomcat configuration, add Run another configuration and choose the Maven configuration.