Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3750732
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T08:58:27+00:00 2026-05-19T08:58:27+00:00

i notice that this controller has now been deprecated in the latest spring and

  • 0

i notice that this controller has now been deprecated in the latest spring and was wondering what the alternative controller is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T08:58:27+00:00Added an answer on May 19, 2026 at 8:58 am

    In Spring 3.0 you should use simple classes annotated by @Controller. Such controller can handle more than one request. Each request is handled by its own method. These methods are annotated by @RequestMapping.

    One thing you need to rethink is the fact, that a old school SimpleFormController handle a lot of different requests (at least: one to get the form and a second to submit the form). You have to handle this now by hand. But believe me it is easier.

    For example this Controller in REST Style, will handle two requests:

    • /book – POST: to create a book
    • /book/form – GET: to get the form for creation

    Java Code:

    @RequestMapping("/book/**")
    @Controller
    public class BookController {
    
        @RequestMapping(value = "/book", method = RequestMethod.POST)
        public String create(
            @ModelAttribute("bookCommand") final BookCommand bookCommand) {
    
            Book book = createBookFromBookCommand(bookCommand);
            return "redirect:/book/" + book.getId();
        }
    
        @RequestMapping(value = "/book/form", method = RequestMethod.GET)
        public String createForm(final ModelMap modelMap) {
            modelMap.addAttribute("all", "what you need");
            return "book/create"; //book/create.jsp
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now I realise this topic has been covered many times before. However there did
I notice that StackOverflow has a views count for each question and that these
Now that everyone is talking about MVC, I notice that the business rules are
So we have a real-estate-related site that has controller/action pairs like homes/view, realtors/edit, and
Update: this question has been answered (see below). I'll leave it up in case
I have a controller that has the following index action : def index if
I just noticed that you can do this in C#: Unit myUnit = 5;
This is pretty trivial, but I noticed on SO that instead of an offset
I notice that modern C and C++ code seems to use size_t instead of
I notice that there's frequently an aspnet_client folder under the standard IIS web folder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.