Announcement Announcement Module
Collapse
No announcement yet.
Spring 3 MVC without annotation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3 MVC without annotation

    Can we develop Controller without using annotation in spring 3. I want to use forms, how do I create without using annotations.

  • #2
    Yes you can, although that support is deprecated and will be removed in one of the future versions of spring (as with all the deprecated things). How to do that is explained in the reference guide, I suggest you give it a read.

    Comment


    • #3
      Thanks for the quick reply Marten.

      Yes. I agree with you the simpleformcontroller is deprecated. So, in Spring 3 if I need to use forms I have to use annotations, as in future releases we may not have the simpleformcontroller or any other controllers that were supported in Srping 2.5 version(it is present in portlet).

      Comment


      • #4
        Why would you use Spring 3.x if you don't want to use annotations? Do you have a strong case for it or just like that?

        Comment


        • #5
          That is a good question. I am developing new application, want to use all latest versions. So, that I can learn as well develop the same. when using the Spring 3, learnt that we should use annotation for MVC, not sure why only annotations are supported as part of MVC (any strong reasons for this drastic change in framework). Is Spring newer releases going annotation way?

          Comment


          • #6
            The old style controllers are still supported but deprecated. The switch was made because with annotations you have more flexibility in writing your controllers then with the old style controllers. It is all about flexibility especially with the upcoming 3.1/3.2 releases this will show (although3.0 was a great step forward compared to 2.5).

            Comment


            • #7
              Just wondering if the annotation approach is kind of anti-IOC?

              Comment


              • #8
                RE:Spring 3 MVC without annotation

                Originally posted by c.madhu.2005 View Post
                Can we develop Controller without using annotation in spring 3. I want to use forms, how do I create without using annotations.
                Hello,

                You may want to try MultiActionControllers. They are not deprecated and provide a good alternative.

                Regards,
                Prasad Khandekar

                Comment

                Working...
                X