Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Spring Security

Fala galera, tudo bem?? Estou tendo um problema com o spring security aqui e não to sabendo pra onde correr, podem me dar uma luz? Começou a acontecer depois que eu implementei a classe de configuração. Erro:

https://gist.github.com/igorpk10/11ca4275f2efa18085430af6b08a7540

Classe:

package com.servidor.igor.security;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

@Configuration
@EnableWebSecurity
public class WebSecurityConf extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception{
        http.csrf().disable().authorizeRequests().antMatchers(HttpMethod.GET,"/").permitAll().anyRequest().authenticated().and().formLogin().permitAll().and().logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout"));
    }
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception{
        auth.inMemoryAuthentication().withUser("igor").password("igor123").roles("ADMIN");
    }

    public void configure (WebSecurity web) throws Exception{
        web.ignoring().antMatchers("/css/**","/js/**");
    }
}

Help me!!!

1 resposta
solução!

Gente, consegui corrigir o erro a cima. Agora passei pra este!

https://gist.github.com/igorpk10/a6ef08cc0bafb8a93ef5f00b2322f97a

Help ME!!!!