updated deprecation: HandlerInterceptorAdapter class -> HandlerInterceptor interface

This commit is contained in:
Gerardo Roza 2021-01-20 12:37:10 -03:00
parent 42ca93dbbf
commit 59e4bd9811
1 changed files with 5 additions and 5 deletions

View File

@ -1,16 +1,16 @@
package com.baeldung.loginredirect; package com.baeldung.loginredirect;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpStatus; import org.apache.http.HttpStatus;
import org.springframework.security.authentication.AnonymousAuthenticationToken; import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.util.UrlPathHelper; import org.springframework.web.util.UrlPathHelper;
import javax.servlet.http.HttpServletRequest; class LoginPageInterceptor implements HandlerInterceptor {
import javax.servlet.http.HttpServletResponse;
class LoginPageInterceptor extends HandlerInterceptorAdapter {
@Override @Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {