Spring Annotation Driven Controller in different bundles [message #865699] |
Mon, 30 April 2012 10:28  |
Eclipse User |
|
|
|
Hello,
I am trying to use Snaps and Spring MVC annotation driven controller and using this i want to develop my UI code in a way that a new functionality with all its UI code (including the JSP's and Controllers can become a new bundle) For this i am using the annotation driven controller. However my new controllers defined in a new snap are not mapped and seem to get ignored during the deployment.
This is how its configured:
In our host bundle we have this configuration
<context:component-scan base-package="com.esprittechnology.animals.ui.controller"/>
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
this is how my controller is annotated:
@Controller
@RequestMapping("/categories.do")
public class CategoryController {
}
While deploying the host bundle I can see the debug showing the annotation configuration working: " Mapped URL path [/categories.do] onto handler 'categoryController' "
In my snap i have this configuration:
<context:component-scan base-package="com.esprittechnology.animals.ui.mammals.controller"/>
<bean id="internalViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
However on deployment of the snap i don't see the annotation configuration work to create the appropriate controller mappings.
Can somebody please let me know if this kind of configuration is not supported..? I only tried snaps because I read Virgo TS does not support fragments for web bundles.
thanks
Amritesh
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04753 seconds