If you want to control the display from the prop file, you can do this as shown below
In your application.properties application add a pair of key values
url.mapping : /test/sample
On the controller, you can do the following:
@Controller @RequestMapping(value = { "${url.mapping}" }) public class CustomerController{
Instead of providing the prop in the file, if you provide url.mapping as jvm arg , then you do not need to recompile, if you change the value, just restart (which I hope you can do, you havenβt tried it yourself) should do the trick.
For multiple mappings, you need to add one for each mapping and display it in the controller, as shown below.
@Controller @RequestMapping(value = { "${url.mapping}","${url.mapping.two}" }) public class CustomerController{
source share