5
respostas

Exceção com springSecurityFilterChain()

Olá,

Eu fiz o exercício do Personalizando o login e logout, mas ele gera a exceção em que o método springSecurityFilterChain não existe. Mas quando a implemento da seguinte forma:

@EnableWebMvcSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Bean
    public FilterChainProxy springSecurityFilterChain() {
        return new FilterChainProxy(new DefaultSecurityFilterChain(new AntPathRequestMatcher("/**")));
    }
}

Ela não mostra a tela de login, funciona como se não tivesse inserido o Spring Security.

5 respostas

Oi Renato, pode colocar aqui a exception? Só para adiantar o seu código está meio estranho.. vc não precisa declarar esse método aí, isso já é o default.

Estou no inicio da aula 4, e também estou com o mesmo problema, nenhuma exception é exibida no console e as paginas são acessadas normalmente. O debug entra no método springSecurityFilterChain() na inicialização do tomcat, mas "nunca" entra nos métodos configure(HttpSecurity http) . Segue abaixo como estão minhas classes:

@EnableWebMvcSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Bean
    public FilterChainProxy springSecurityFilterChain() {
        return new FilterChainProxy(new DefaultSecurityFilterChain(new AntPathRequestMatcher("/**")));
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        super.configure(http);
    }

    @Override
    public void configure(WebSecurity web) throws Exception {
        super.configure(web);
    }
}
public class ServletSpringMVC extends AbstractAnnotationConfigDispatcherServletInitializer {

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[] { AppWebConfiguration.class, JPAConfiguration.class };
    }

    @Override
    protected String[] getServletMappings() {
        return new String[] { "/" };
    }

    @Override
    protected Filter[] getServletFilters() {
        CharacterEncodingFilter encodingFilter = new CharacterEncodingFilter();
        encodingFilter.setEncoding("UTF-8");
        return new Filter[] { encodingFilter };
    }

    @Override
    protected void customizeRegistration(Dynamic registration) {
        registration.setMultipartConfig(new MultipartConfigElement(""));
    }
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{SecurityConfiguration.class};
    }

}
public class SpringSecurityFilterConfiguration extends AbstractSecurityWebApplicationInitializer {

}

Arquivo pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.casadocodigo</groupId>
    <artifactId>casadocodigo</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>casadocodigo Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <!-- Frame de gerenciamento de cache -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>4.1.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.1.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-servlet-api</artifactId>
            <version>7.0.30</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>jstl-api</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>jstl-impl</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>1.6.1</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.6.1</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
            <scope>runtime</scope>
        </dependency>
        <!-- Dependencias para Persistencia de dados -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.3.0.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>4.3.0.Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.1-api</artifactId>
            <version>1.0.0.Final</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>4.1.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.15</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.2.0.Final</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.5.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.5.1</version>
        </dependency>

        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>4.0.0.M2</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>4.0.0.M2</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>4.1.1.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>4.0.0.M2</version>
        </dependency>


    </dependencies>

    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <finalName>casadocodigo</finalName>
    </build>
</project>

Toda ajuda é bem vinda, tentei de tudo.

Esqueci de um detalhe, se eu não coloco esse método public FilterChainProxy springSecurityFilterChain() é dado o erro abaixo na inicialização do Tomcat, por isso que implementei isso.

Dez 12, 2016 5:28:52 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:casadocodigo' did not find a matching property.
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version:        Apache Tomcat/8.0.24
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built:          Jul 1 2015 20:19:55 UTC
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number:         8.0.24.0
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name:               Windows 8.1
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version:            6.3
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture:          amd64
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home:             C:\Program Files\Java\jdk1.7.0_79\jre
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version:           1.7.0_79-b15
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor:            Oracle Corporation
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE:         C:\Tomcat - Testes
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME:         C:\Tomcat - Testes
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\Tomcat - Testes
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\Tomcat - Testes
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\Tomcat - Testes\wtpwebapps
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\Tomcat - Testes\endorsed
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252
Dez 12, 2016 5:28:52 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_79\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.7.0_79/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_79/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_79/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.7.0_79;C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\oracle\ora92\bin;C:\Program Files (x86)\Oracle\jre\1.3.1\bin;C:\Program Files (x86)\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Program Files\eclipse;;.
Dez 12, 2016 5:28:52 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8082"]
Dez 12, 2016 5:28:52 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
Dez 12, 2016 5:28:52 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8010"]
Dez 12, 2016 5:28:52 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
Dez 12, 2016 5:28:52 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 591 ms
Dez 12, 2016 5:28:52 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Catalina
Dez 12, 2016 5:28:52 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.0.24
Dez 12, 2016 5:28:55 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Dez 12, 2016 5:28:55 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Spring WebApplicationInitializers detected on classpath: [br.com.casadocodigo.loja.conf.SpringSecurityFilterConfiguration@3479bed9, br.com.casadocodigo.loja.conf.ServletSpringMVC@24e0b379]
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Dez 12, 2016 5:28:55 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Initializing Spring root WebApplicationContext
Dez 12, 2016 5:28:56 PM org.apache.catalina.core.StandardContext listenerStart
GRAVE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public javax.servlet.Filter org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain() throws java.lang.Exception] threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.util.AntPathMatcher.setCaseSensitive(Z)V
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:601)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1113)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1008)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public javax.servlet.Filter org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain() throws java.lang.Exception] threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.util.AntPathMatcher.setCaseSensitive(Z)V
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:188)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590)
    ... 23 more
Caused by: java.lang.NoSuchMethodError: org.springframework.util.AntPathMatcher.setCaseSensitive(Z)V
    at org.springframework.security.web.util.matcher.AntPathRequestMatcher$SpringAntMatcher.createMatcher(AntPathRequestMatcher.java:268)
    at org.springframework.security.web.util.matcher.AntPathRequestMatcher$SpringAntMatcher.<init>(AntPathRequestMatcher.java:252)
    at org.springframework.security.web.util.matcher.AntPathRequestMatcher$SpringAntMatcher.<init>(AntPathRequestMatcher.java:245)
    at org.springframework.security.web.util.matcher.AntPathRequestMatcher.<init>(AntPathRequestMatcher.java:116)
    at org.springframework.security.web.util.matcher.AntPathRequestMatcher.<init>(AntPathRequestMatcher.java:84)
    at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.<init>(UsernamePasswordAuthenticationFilter.java:62)
    at org.springframework.security.config.annotation.web.configurers.FormLoginConfigurer.<init>(FormLoginConfigurer.java:73)
    at org.springframework.security.config.annotation.web.builders.HttpSecurity.formLogin(HttpSecurity.java:976)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.configure(WebSecurityConfigurerAdapter.java:322)
    at br.com.casadocodigo.loja.conf.SecurityConfiguration.configure(SecurityConfiguration.java:22)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:199)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:283)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:68)
    at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:367)
    at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:320)
    at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:39)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:92)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$c415c092.CGLIB$springSecurityFilterChain$0(<generated>)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$c415c092$$FastClassBySpringCGLIB$$10363bc6.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:312)
    at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$c415c092.springSecurityFilterChain(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166)
    ... 24 more

Dez 12, 2016 5:28:56 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Dez 12, 2016 5:28:56 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/casadocodigo] startup failed due to previous errors
Dez 12, 2016 5:28:56 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Closing Spring root WebApplicationContext
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\Tomcat - Testes\webapps\docs
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\Tomcat - Testes\webapps\docs has finished in 32 ms
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\Tomcat - Testes\webapps\examples
Dez 12, 2016 5:28:56 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: ContextListener: contextInitialized()
Dez 12, 2016 5:28:56 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: SessionListener: contextInitialized()
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\Tomcat - Testes\webapps\examples has finished in 295 ms
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\Tomcat - Testes\webapps\host-manager
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\Tomcat - Testes\webapps\host-manager has finished in 29 ms
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\Tomcat - Testes\webapps\manager
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\Tomcat - Testes\webapps\manager has finished in 24 ms
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\Tomcat - Testes\webapps\ROOT
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\Tomcat - Testes\webapps\ROOT has finished in 20 ms
Dez 12, 2016 5:28:56 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8082"]
Dez 12, 2016 5:28:56 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["ajp-nio-8010"]
Dez 12, 2016 5:28:56 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 3751 ms

Entendi, é pq vc não estão criando uma classe que já herda do springsecurity, um exemplo está aqui => https://github.com/livrospringmvc/lojacasadocodigo/blob/master/src/main/java/br/com/casadocodigo/loja/conf/SpringSecurityFilterConfiguration.java

E aí vc adicionaria a referencia para ela na configuração, como está aqui => https://github.com/livrospringmvc/lojacasadocodigo/blob/master/src/main/java/br/com/casadocodigo/loja/conf/ServletSpringMVC.java

De todo jeito, outra coisa que não vi foi a configuração das áreas protegidas.

Obrigado pela ajuda Alberto, consegui resolver o problema alterando o pom.xml conforme abaixo, não é a ultima versão do spring security mas funcionou conforme o tutorial do exercício, sem ter que precisar criar o método public FilterChainProxy springSecurityFilterChain(), então agora a tela de login está sendo exibida sem problemas.

        <!-- Spring Security -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>