What I would like to do is to have a common service class that has various methods like search "retriveByID" etc. Ideally, this class will use the service parameters and populate the request object and pass it to the corresponding data source handler.
I want to create an instance of a service class as a Spring bean with different request handlers depending on the domain search object. Then, a bean called BeanNameUrlHandlerMapping calls another service class based on the URL.
<bean name="/sequence/*" class="org.dfci.cccb.services.SearchServiceImpl">
<property name="searchHandler">
....
My problem is that when I try to do this, I cannot use the method level RequestMapping annotations to select the appropriate service class method.
@RequestMapping("*/search/")
QueryResult search(...
Alternatively, you can enter annotation values through the bean definitions?
UPDATE
There is also a Springsource article on this topic:
http://blog.springsource.com/2008/03/23/using-a-hybrid-annotations-xml-approach-for-request-mapping-in-spring-mvc/
source
share