小编ti.*_*002的帖子

在Spring Security登录后,我被重定向到CSS/JS资源而不是HTML页面

我有一个带有spring-security和PrimeFaces的项目,当我执行我的项目时,我收到了一个错误.

此网址始终显示 /javax.faces.resource/primefaces.js.xhtml?ln=primefaces&v=5.1

当我覆盖此方法时会发生这种情况:

@Override
protected void configure(HttpSecurity http) throws Exception {
    http.csrf().disable();
    http.authorizeRequests()
        .anyRequest().authenticated()
        .and()
        .formLogin().loginPage("/login.xhtml")
        .permitAll();
}
Run Code Online (Sandbox Code Playgroud)

并把我自己的登录页面.但是我的web.xml调用home.xhtml页面

<welcome-file-list>
    <welcome-file>home.xhtml</welcome-file>
</welcome-file-list>
Run Code Online (Sandbox Code Playgroud)

这就是它显示是这样:

在此输入图像描述

jsf redirect login spring-security

13
推荐指数
1
解决办法
2536
查看次数

标签 统计

jsf ×1

login ×1

redirect ×1

spring-security ×1