Spring MVC Request mapping, can this be dynamic/configurable?

前端 未结 5 816
慢半拍i
慢半拍i 2021-02-19 06:37

With Spring MVC, I know how you set the RequestMapping in every controller and method/action.

But what if I wanted this to be configurable, so for example I

5条回答
  •  甜味超标
    2021-02-19 07:08

    Truly changing the request mappings at runtime might be hard (and not really recommended, since small errors can easily occur). If you still wish to do it, perhaps JRebel, and more specificly LiveRebel can be interesting for live redeployment of code and configuration.

    Otherwise, like other posts suggested, RequestMappings supports wildcards, the limits of this should be clear after a quick read of the official documentation.

提交回复
热议问题