I have a problem in my web app. If user was logout & try signin again , browser load my css file not a web page!!!!! (web url http://localhost:8888/resources/html/css/mystyle.css) ! If try again - thats ok loads my web page. After logout again css file/// I use java, spring mvc, spring security.
<link href="/resources/html/css/mystyle.css" rel="stylesheet">
In my AppConfig extends WebMvcConfigurerAdapter i use handler:
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations("/WEB-INF/resources/");
}
And my login code:
<c:url value="/j_spring_security_check" var="loginUrl" />
<form action="${loginUrl}" class="form-horizontal" method="post">
http.formLogin()
.loginPage("/")
.loginProcessingUrl("/j_spring_security_check")
.defaultSuccessUrl("/projects", false)
.failureUrl("/hello/signINincorrect")
.usernameParameter("j_username")
.passwordParameter("j_password")
Aucun commentaire:
Enregistrer un commentaire