Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Interceptors are not being invoked with PortletMVC4Spring #14

Open
ahujadipak3 opened this issue Jul 31, 2020 · 1 comment
Open

Comments

@ahujadipak3
Copy link

Hi @ngriffin7a and Team,

I am trying to implement basic authentication using Spring REST with Liferay 7 (portletmvc4spring) where I have extended the Spring interceptor HandlerInterceptorAdapter and provided in main application context xml as follows:

<mvc:interceptors> <mvc:interceptor> <!-- <mvc:mapping path="/user/authenticate"/> --> <mvc:mapping path="/test/**"/> <mvc:mapping path="/ping/**"/> <mvc:mapping path="/secured/**"/> <mvc:mapping path="/**"/> <bean class="portlet1.interceptor.SecureRequestHandlerInterceptor"></bean> </mvc:interceptor> </mvc:interceptors>

However, the interceptor is not being invoked. I am attaching the sample project for the same. Can you please help with this this.

com.liferay.test.portletmvc4spring.portlet.zip

Thanks in advance.
-Dipak Ahuja

@genmllc
Copy link

genmllc commented Aug 12, 2020

Hello, try to add <mvc:annotation-driven />in portlet-application-context.xml, it should do the trick. Without it, many Spring MVC features won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants