views:

25

answers:

1

Hi All,

I just recently learned about spring mvc but the tutorials that I have seen uses concrete framwework controllers. (SimpleFormCOntroller/AbstractController..etc)

As I know, they were deprecated in Spring MVC 3.0 right now.

As I have been reading on the forum, they say that annotated controller are flexible than the one that extends spring classes. My question is, is it possible to mix both annotated and concrete controllers at one web application context?

I only know how to use non-annotated style controller. But I think I want to learn the annotation based also. I need to add multiple form in one of my module and only annotated controller can handle this as per what they say.

I am afraid that I already have done some coding already and I dont want to rewrite those that are working already

A: 

Absolutely, you can mix them together as much as you want, no restrictions on that. It should just work.

DispatcherServlet has an automatically-defined list of HandlerMapping objects (which decide which requests go to which controllers), and HanderAdapter objects (which determine how the controllers are invoked). Both old-style and annotation-style controllers are supported out of the box, at the same time, in the same context.

skaffman
Hi Skaffman,Thanks. I'll get going into studying annotated controller type and how to mix them both.Expect me to post some question about this though. =)
Mark Estrada
@Mark: Bring it on :)
skaffman