I need to override the requestmapping of /auth/{providerId} so that I can introduce two another behaviour from a different part of the website and therefore need to find that controller...
-
possible duplicate of [hybris - Which Spring Controller is serving my request?](http://stackoverflow.com/questions/21377187/hybris-which-spring-controller-is-serving-my-request) – Henrique Ordine Sep 09 '14 at 07:39
1 Answers
One way to do it with Spring would be to extend HandlerInterceptorAdapter to create a new interceptor which will be invoked before the Controller is invoked.
In its preHandle(HttpServletRequest, HttpServletResponse, Object handler)
method, the handler is the controller which will serve the request, and therefore you can log the controller's name in your log files. Remember to set the log level accordingly for this class.
You need to add this interceptor to <mvc:interceptors>
in your spring-mvc-config.xml.
Then when you access your URL you can see the name of the controller being logged in your log files.
This answer was given to my question here, which is essentially the same as your question as Hybris uses Spring.
An easier way to do it, would be to search for the string "/auth/" in your *.java files. But you might have to be lucky.

- 1
- 1

- 3,337
- 4
- 44
- 70
-
I've searched my *.java and my logs and no result! so I'm assuming this handling is not a simple controller but rather implemented in some clever way inside spring social.. – ricardoespsanto Sep 09 '14 at 09:53
-