Search code examples
javaspring-mvcrestlet

How to migrate restlet filter to spring mvc?


I'm starting to migrate a restlet based application to spring mvc.

Currently we use restlet Filters for security and logging. What's the best approach to migrate this filters to spring mvc? I was thinking about aspects added to the action methods via annotation. Is this the spring way to implement filters?


Solution

  • for filters, you can use Spring MVC Interceptors. For security, you normaly use Spring Security which can be based on annotations, if you want, or endpoint-configuration (e.g. /admin/* should be secured)