1
ここに問題が残っています。私は私のアプリケーションのためのプライムフェイスのスプリングブートを使用しています。私は春のセキュリティを認証に使用しています。どういうわけか私はアクセスが拒否されています。それに加えて、ユーザーは既にmongodbに設定されています。もし私がスプリングリダイレクトを使用していれば、すべてがうまくいきます。スプリングセキュリティスプリングブート4.x
http.csrf().csrfTokenRepository(csrfTokenRepository()).and().authorizeRequests().antMatchers("/login**").access("permitAll")
.antMatchers("/logout**").access("permitAll")
.antMatchers("/secure/homePage.xhtml").access("hasRole('ADMIN') or hasRole('USER')")
.anyRequest().authenticated().and().formLogin().loginPage("/login").defaultSuccessUrl("/secure/homePage.xhtml")
.failureUrl("/login.xhtml?error").usernameParameter("email").and().logout().logoutUrl("/logout.xhtml")
.logoutSuccessUrl("/login.xhtml").invalidateHttpSession(true).clearAuthentication(true).and()
.exceptionHandling().accessDeniedPage("/accessDenied.xhtml");
はところで、私は私のログインページに次のようにあります
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
で
helloWorld.xhtml
は、あなたがこの[例](https://github.com/spring-projects/spring-boot/tree/master/springを参照してくださいとしています-boot-samples/spring-boot-sample-web-method-security)プロジェクトをgithubで実行します。彼らには解決策があるかもしれません。 –