Example usage for org.springframework.security.access SecurityConfig getAttribute

List of usage examples for org.springframework.security.access SecurityConfig getAttribute

Introduction

In this page you can find the example usage for org.springframework.security.access SecurityConfig getAttribute.

Prototype

@Override
    public String getAttribute() 

Source Link

Usage

From source file:org.springframework.security.access.annotation.SecuredAnnotationSecurityMetadataDefinitionSourceTests.java

public void testGetAttributesClass() {
    Collection<ConfigAttribute> attrs = this.mds.findAttributes(BusinessService.class);

    assertNotNull(attrs);// w w w.java 2 s.co m

    // expect 1 annotation
    assertEquals(1, attrs.size());

    // should have 1 SecurityConfig
    SecurityConfig sc = (SecurityConfig) attrs.toArray()[0];

    assertEquals("ROLE_USER", sc.getAttribute());
}