Since there are many types of controllers in Spring2.5 version, what kind of controller does Spring internally implement when @controller is used? and how does spring decide what controller to implement?
Since there are many types of controllers in Spring2.5 version, what kind of controller
Share
Short answer: It doesn’t matter how @Controller is implemented internally.
Long answer:
First you should read the reference manual to know the API, which is primarly based on annotations. You have no
AbstractController,SimpleFormControlleretc. Important sentence:You must abandon “Spring MVC 2.5 thinking” and just define beans annotated with
@Controllerlikeand just use them as ordinary beans (by adding to servlet.xml
<bean class="com.example.ClinicController " />). It’s much easier this way.