i notice that this controller has now been deprecated in the latest spring and was wondering what the alternative controller is?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
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
SimpleFormControllerhandle 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:
Java Code: