Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package br.edu.ifpb.blogsoon.webapp.config; import br.edu.ifpb.blogsoon.webapp.filter.Autorizacao; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * * @author Emanuel Batista da Silva Filho - emanuelbatista2011@gmail.com */ @Configuration public class ConfigAutorizacao extends WebMvcConfigurerAdapter { @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new Autorizacao()).addPathPatterns("/usuario/**") .excludePathPatterns("/usuario/login").excludePathPatterns("/usuario/cadastro"); } }