2016-07-26 11 views
0

私は、自分のプロジェクトにSpring Securityの追加にいくつか問題があります。私は自動ログインフォームを使用して初期設定を行っており、うまくいきました。しかし、ログインして何らかのアクションを試みた後、私のcommandButtonがもう動作していないことに気付きました。クリックすると何も起こりません。この場合、設定を行う必要はありますか?ここでSpring Security blocking commandButtonアクション

は私のapplicationContext.xmlをです:

<?xml version="1.0" encoding="UTF-8"?> 
<beans:beans xmlns="http://www.springframework.org/schema/security" 
      xmlns:beans="http://www.springframework.org/schema/beans" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-4.1.xsd 
      http://www.springframework.org/schema/security 
      http://www.springframework.org/schema/security/spring-security-4.1.xsd"> 

    <http pattern="/javax.faces.resource/**" security="none" /> 
    <http pattern="/login.xhtml" security="none" /> 
    <http pattern="/404.xhtml" security="none" /> 
    <http pattern="/error.xhtml" security="none" /> 
    <http pattern="/access-denied.xhtml" security="none" /> 

    <http auto-config="true"> 
     <intercept-url pattern="/**" access="hasAnyRole('ROLE_ADMINISTRADORES')" /> 
    </http> 

    <authentication-manager> 
     <authentication-provider> 
      <user-service> 
       <user name="joao" password="123" authorities="ROLE_VENDEDORES" /> 
       <user name="jean" password="123" authorities="ROLE_ADMINISTRADORES" /> 
      </user-service> 
     </authentication-provider> 
    </authentication-manager> 

</beans:beans> 

はあなたのすべてをありがとう!

+0

問題を解決しようとすることでした!非常にスラヴァーありがとうございました。あなたは私を救った! CSRFのオフに問題はありますか? –

+0

答えとして投稿しました。また、Spring Securityのドキュメントへのリンクを追加しました。ここで、このトピックの詳細を見つけることができます。 –

答えて