How can I run common code for most requests in my Spring MVC Web App?

前端 未结 3 2044
清歌不尽
清歌不尽 2021-02-09 15:00

i.e.

I have various URLs mapped using Spring MVC RequestMapping

@RequestMapping(value = \"/mystuff\", method = RequestMethod.GET) 
@RequestMapping(value          


        
3条回答
  •  执念已碎
    2021-02-09 15:42

    You can use an Interceptor:

    http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-handlermapping

提交回复
热议问题