IntelliJ + Spring: Trying to deploy app to localhost:8080/, not localhost:8080/myapp.

IntelliJ + Spring:

I'm trying to deploy app to localhost:8080/, but when I run it, it runs on localhost:8080/myapp instead. I'm new to both Spring and IntelliJ, so I'm not sure whether this is a configuration of Spring (Boot) or the IDE. Eclipse simply ran the application on the desired location (localhost:8080/) so I assume it's an IDE setting, but I can't find how to fix it in IntelliJ. Any help would be greatly appreciated.

Note that I'm doing this without a standalone Tomcat. I'm merely selecting the "Application" class and running it. Thus, under project settings, there is no "Startup page" field under "Run Configurations" under "Tomcat" as I've seen advised elsewhere. There is no "Tomcat" item in the left hand side of that window at all.

Also, I don't know if it matters, I've got this set up as a Maven project and it does build and execute... just not in the right place.

IntelliJ 14.1.2

1 comment
Comment actions Permalink

Hello,

you should be able to configure this via server.contextPath=/your-other-path in application.properties

See also http://stackoverflow.com/questions/18776560/is-there-a-standard-way-to-customize-the-deploy-path-in-spring-boot for other ways

0

Please sign in to leave a comment.