Olá Alex, tudo bem? Peço desculpas pela demora no retorno! Mas o problema é que subimos o SecurityConfiguration na inicialização da aplicação (root) e ai ele começa a bloquear todo o acesso que não é permitido, e usamos o seguinte código para acesso ao bootstrap:
<c:url value="/resources/css" var="cssPath"></c:url>
<link rel="stylesheet" href="${cssPath}/bootstrap.min.css">
<link rel="stylesheet" href="${cssPath}/bootstrap-theme.min.css">
Ele ele está bloqueando, para resolver esse problema, você pode ir na classe SecurityConfiguration e então adicionar outro antMatchers
, agora permitindo todo o acesso a pasta resources
, ficando como:
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/produtos/form").hasRole("ADMIN")
.antMatchers("/carrinho").permitAll()
.antMatchers(HttpMethod.POST, "/produtos").hasRole("ADMIN")
.antMatchers(HttpMethod.GET, "/produtos").hasRole("ADMIN")
.antMatchers("/resources/**").permitAll()
.antMatchers("/produtos/**").permitAll()
.antMatchers("/").permitAll()
.anyRequest().authenticated()
.and().formLogin();
}
Isso deve resolver o problema, espero ter ajudado!