Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Spring Annotation Driven Controller in different bundles
Spring Annotation Driven Controller in different bundles [message #865699] Mon, 30 April 2012 14:28 Go to next message
Amritesh Bhardwaj is currently offline Amritesh Bhardwaj
Messages: 1
Registered: April 2012
Junior Member
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
Re: Spring Annotation Driven Controller in different bundles [message #941347 is a reply to message #865699] Fri, 12 October 2012 12:33 Go to previous messageGo to next message
Graeme Dougal is currently offline Graeme Dougal
Messages: 8
Registered: September 2012
Junior Member
Hi

I'm facing the exact same issue at the moment with Snaps and Virgo in that I want to have Spring MVC controllers in both my snap host and snap.

Did you reolve this ?

Cheers
Graeme
Re: Spring Annotation Driven Controller in different bundles [message #990350 is a reply to message #941347] Wed, 12 December 2012 05:40 Go to previous message
shiv khillar is currently offline shiv khillar
Messages: 2
Registered: December 2012
Junior Member
Hi,
I have created a sample app and able to load controllers from the snap bundles with mvc that are annotation driven. I have posted the same in another question in the forum.

http://www.eclipse.org/forums/index.php/t/400172/


Thanks
Shiv
Previous Topic:Blueprint Cyclic Dependency
Next Topic:Hot deployment of plan bundle
Goto Forum:
  


Current Time: Tue Sep 30 22:12:20 GMT 2014

Powered by FUDForum. Page generated in 0.22689 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software