I’m creating menu and I would like to link my menu items to Spring controller paths. One way to do this is to include menu code to all methods that contain @RequestMapping annotations, but it would be manual task, I would like to automate this task, so that I could just define menu bean and add menu in site template and menus would be generated automatically for every path.
Share
SpringMVC Interceptors might be a bit easier than the straight AOP above.
Note: This approach does couple the code a bit more to Spring MVC, but it’d be an easy port to a similar interception/aspect application in any other framework