Change context root without recompiling?

I start with Spring boot. Must I recompile to change the context root or can it be set from outside like the port can with “-Dserver.port=”. Is there a coding standard to follow to make the context root changeable from outside?

Found this: https://stackoverflow.com/questions/20405474/add-context-path-to-spring-boot-application

Yes, “-Dserver.contextPath=/extra” works.