Difference between handleRequestInternal and handleRequest

I just started spring, I found that somewhere we are using a method handlerequest()

in the controller and somewhere we are using a method handlerequestinternal()

.

I tried using this but didn't find any specific point.

Can anyone explain what is the difference between these two functions and when should we implement each of them?

As I know the spring framework will call the default function handlerequest()

, so we can put our service layer there.

I'm sure I handlerequestinternal()

should provide some additional functionality, but I'm not sure.

Please help me understand this.

+3


source to share


1 answer


Both handleRequest

and handleRequestInternal

used the old infrastructure Spring 2.0 controller.

handleRequestInternal

used when you expand one of the previously prepared basic support classes (eg AbstractController

, SimpleFormController

etc.). They use the template template template and you provide your business logic in this method.



handleRequest

is a method specified on the interface itself Controller

. If you are directly implementing this interface rather than extending one of the above base classes, then you need to directly implement handleRequest

.

Both are deprecated and not used in controllers written for Spring 2.5 and later.

+7


source







All Articles