antMatchers
Publicado por gabriela paola (3 intervenciones) el 17/02/2020 20:14:59
Hola! buenas tardes, tengo problema en el siguiente codigo :
cuando accedo a games.html no me carga el javascript ni el css. No se supone que en ".antMatchers("/resources/static/web/scripts/games.js").permitAll()" estoy accediendo a esos archivos? Muchas gracias por la ayuda!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/web/games.html").permitAll()
.antMatchers("/api/games").permitAll()
.antMatchers("/resources/static/web/scripts/games.js").permitAll()
.antMatchers("/resources/static/web/css/games.css").permitAll()
.antMatchers("/web/**").hasAuthority("USER")
.antMatchers("/api/game_view/**").hasAuthority("USER")
.antMatchers("/resources/static/web/**").hasAuthority("USER");
http.formLogin()
.usernameParameter("name")
.passwordParameter("pwd")
.loginPage("/api/login");
http.logout().logoutUrl("/api/logout");
}
cuando accedo a games.html no me carga el javascript ni el css. No se supone que en ".antMatchers("/resources/static/web/scripts/games.js").permitAll()" estoy accediendo a esos archivos? Muchas gracias por la ayuda!
Valora esta pregunta


0