Hi Spring Boot Experts, I am trying to run/build a spring boot project in such a way that it can run under multiple context paths (localhost:8080/external-portal & localhost:8081/internal-portal ).I have a application like internal & external portal, Code is exactly same for both applications with some conditional checks in the code to differentiate between internal & external app.I don't want to duplicate code base, but both applications will run as separate instance on different ports like localhost:8080/external-portal & localhost:8081/internal-portal.I have idea about maven overlays, but it seems they wont work with spring boot.
Asked
Active
Viewed 1,137 times
0
-
`java -jar your-archive.jar --server.port=8081 --server.contextpath=/internal-portal` or whatever you want those properties to be. – M. Deinum Jan 13 '18 at 18:00
-
@M.Deinum Thanks this idea some how serve my purpose. – Junaid Akhtar Jan 14 '18 at 04:44