|
What would be VERY helpful is allow developers to introduce custom @RequestMapping implementations.. This might help in this case. For example, I might have something like: @DomainBasedRequestMapping(value = "/home.htm", domain = "myotherdomain.com") I tried doing this in Spring 2.5 but it got VERY difficult. @Grant: Adding support for custom @RequestMapping annotations is a nice feature to have, but pretty hard to implement. Feel free to create a separate issue for it, though. After some thought, we will not implement this, because it really complicates the request mapping algorithms. Also, there are alternatives for the underlying cause issue:
|
||||||||||||||||||||||||||||||||||||||
As Java does not allow multiple annotations of the same type on a method, the only thing we can do is introduce a @RequestMappings annotation that can hold multiple @RequestMapping's, something like:
@RequestMappings{ @RequestMapping (value = "/company", method = RequestMethod.PUT), @RequestMapping (value = "/company", method = RequestMethod.POST, params = "method=put") }
public String update(Company company)