Home >
Back-end > Spring security custom AccessDecisionVoter class ConfigAttribute. The getAttribute () is always null
Spring security custom AccessDecisionVoter class ConfigAttribute. The getAttribute () is always null
Now do the SSM project, verify with the security, use this for the first time, in the custom AccessDecisionVoter class,
Package jp.go.kokusen.pionet.com mon. Security;
Import the Java. Util. Collection;
The import org. Springframework. Security. Access. AccessDecisionVoter;
The import org. Springframework. Security. Access. ConfigAttribute;
The import org. Springframework. Security. Core. The Authentication;
The import org. Springframework. Security. Core. GrantedAuthority;
The import org. Springframework. Security. Web. FilterInvocation;
Public class CustomAccessDecisionVoter implements AccessDecisionVoter