Nessa parte do código da uns erros, acredito ser de importação, mas não consegui resolver.
package br.com.caelum.contas.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
public class AutorizadorInterceptor extends HandlerInterceptorAdapter {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object controller)
throws Exception {
String uri = request.getRequestURI();
if(uri.endsWith("loginForm") || uri.endsWith("efetuaLogin") || uri.contains("resources")) {
return true;
}
if(request.getSession().getAttribute("usuarioLogado")!=null) {
return true;
} else {
response.sendRedirect("loginForm");
return false;
}
}
}
Error:(3, 26) java: package javax.servlet.http does not exist
Error:(4, 26) java: package javax.servlet.http does not exist
Error:(10, 34) java: cannot find symbol
symbol: class HttpServletRequest
location: class br.com.caelum.contas.interceptor.AutorizadorInterceptor
Error:(10, 62) java: cannot find symbol
symbol: class HttpServletResponse
location: class br.com.caelum.contas.interceptor.AutorizadorInterceptor