config/src/main/java/org/springframework/security/config/annotation/method/configuration/MethodSecurityMetadataSourceAdvisorRegistrar.java
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
			BeanDefinitionRegistry registry) {

		BeanDefinitionBuilder advisor = BeanDefinitionBuilder
				.rootBeanDefinition(MethodSecurityMetadataSourceAdvisor.class);
		advisor.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
		advisor.addConstructorArgValue("methodSecurityInterceptor");
		advisor.addConstructorArgReference("methodSecurityMetadataSource");
		advisor.addConstructorArgValue("methodSecurityMetadataSource");

		MultiValueMap<String, Object> attributes = importingClassMetadata.getAllAnnotationAttributes(EnableGlobalMethodSecurity.class.getName());
		Integer order = (Integer) attributes.getFirst("order");
		if (order != null) {
			advisor.addPropertyValue("order", order);
		}

		registry.registerBeanDefinition("metaDataSourceAdvisor",
				advisor.getBeanDefinition());
	}
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
			BeanDefinitionRegistry registry) {

		BeanDefinitionBuilder advisor = BeanDefinitionBuilder
				.rootBeanDefinition(MethodSecurityMetadataSourceAdvisor.class);
		advisor.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
		advisor.addConstructorArgValue("methodSecurityInterceptor");
		advisor.addConstructorArgReference("methodSecurityMetadataSource");
		advisor.addConstructorArgValue("methodSecurityMetadataSource");

		MultiValueMap<String, Object> attributes = importingClassMetadata.getAllAnnotationAttributes(EnableGlobalMethodSecurity.class.getName());
		Integer order = (Integer) attributes.getFirst("order");
		if (order != null) {
			advisor.addPropertyValue("order", order);
		}

		registry.registerBeanDefinition("metaDataSourceAdvisor",
				advisor.getBeanDefinition());
	}
public void registerBeanDefinitions ( AnnotationMetadata importingClassMetadata , BeanDefinitionRegistry registry ) { BeanDefinitionBuilder advisor = BeanDefinitionBuilder . rootBeanDefinition ( MethodSecurityMetadataSourceAdvisor . class ) ; advisor . setRole ( BeanDefinition . ROLE_INFRASTRUCTURE ) ; advisor . addConstructorArgValue ( "methodSecurityInterceptor" ) ; advisor . addConstructorArgReference ( "methodSecurityMetadataSource" ) ; advisor . addConstructorArgValue ( "methodSecurityMetadataSource" ) ; MultiValueMap < String , Object > attributes = importingClassMetadata . getAllAnnotationAttributes ( EnableGlobalMethodSecurity . class . getName ( ) ) ; Integer order = ( Integer ) attributes . getFirst ( "order" ) ; if ( order != null ) { advisor . addPropertyValue ( "order" , order ) ; } registry . registerBeanDefinition ( "metaDataSourceAdvisor" , advisor . getBeanDefinition ( ) ) ; }
Register, escalate, and configure the AspectJ auto proxy creator based on the value
of the @{@link EnableGlobalMethodSecurity#proxyTargetClass()} attribute on the
importing {@code @Configuration} class.
Register escalate and configure the AspectJ auto proxy creator based on the value of the