Alternative to "Run Configuration -> Working directory"

Answered

I have stumbled upon a problem identical to this one:

https://stackoverflow.com/questions/44794588/intellij-run-configuration-spring-boot-vs-maven-issues

In essence:

  • given a Spring Boot MVC app that serves static JSP’s;
  • if we run it using `mvn spring-boot:run`, it works;
  • if we run it from Intellij IDEA, it does NOT work (returns 404).

The only thing that resolved the issue for me was setting "Working directory" option to "$MODULE_WORKING_DIR$". (This solution is mentioned in the answers on SO.)

However, this solution feels clumsy. Also, the run config options are stored in "workspace.xml", which is not committed to VCS.

My question(s):

Is this a bug? Can this be fixed? Is there a persistent workaround?

1
2 comments

You can save run/debug configurations permanently, share them and commit them into the version control, see http://stackoverflow.com/a/3136255/104891 and https://intellij-support.jetbrains.com/hc/articles/206544839.

1

That certainly gives some peace of mind. Thank you.

0

Please sign in to leave a comment.