polishing
This commit is contained in:
parent
6930859e82
commit
a6124793fc
|
|
@ -123,7 +123,7 @@ public class ConfigurationClassPostProcessor implements BeanFactoryPostProcessor
|
||||||
* Build and validate a configuration model based on the registry of
|
* Build and validate a configuration model based on the registry of
|
||||||
* {@link Configuration} classes.
|
* {@link Configuration} classes.
|
||||||
*/
|
*/
|
||||||
protected void processConfigBeanDefinitions(BeanDefinitionRegistry registry) {
|
public void processConfigBeanDefinitions(BeanDefinitionRegistry registry) {
|
||||||
Set<BeanDefinitionHolder> configCandidates = new LinkedHashSet<BeanDefinitionHolder>();
|
Set<BeanDefinitionHolder> configCandidates = new LinkedHashSet<BeanDefinitionHolder>();
|
||||||
for (String beanName : registry.getBeanDefinitionNames()) {
|
for (String beanName : registry.getBeanDefinitionNames()) {
|
||||||
BeanDefinition beanDef = registry.getBeanDefinition(beanName);
|
BeanDefinition beanDef = registry.getBeanDefinition(beanName);
|
||||||
|
|
@ -206,7 +206,7 @@ public class ConfigurationClassPostProcessor implements BeanFactoryPostProcessor
|
||||||
* Candidate status is determined by BeanDefinition attribute metadata.
|
* Candidate status is determined by BeanDefinition attribute metadata.
|
||||||
* @see ConfigurationClassEnhancer
|
* @see ConfigurationClassEnhancer
|
||||||
*/
|
*/
|
||||||
protected void enhanceConfigurationClasses(ConfigurableListableBeanFactory beanFactory) {
|
public void enhanceConfigurationClasses(ConfigurableListableBeanFactory beanFactory) {
|
||||||
Map<String, AbstractBeanDefinition> configBeanDefs = new LinkedHashMap<String, AbstractBeanDefinition>();
|
Map<String, AbstractBeanDefinition> configBeanDefs = new LinkedHashMap<String, AbstractBeanDefinition>();
|
||||||
for (String beanName : beanFactory.getBeanDefinitionNames()) {
|
for (String beanName : beanFactory.getBeanDefinitionNames()) {
|
||||||
BeanDefinition beanDef = beanFactory.getBeanDefinition(beanName);
|
BeanDefinition beanDef = beanFactory.getBeanDefinition(beanName);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2009 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -86,7 +86,7 @@ class ContextTypeMatchClassLoader extends DecoratingClassLoader implements Smart
|
||||||
ReflectionUtils.makeAccessible(findLoadedClassMethod);
|
ReflectionUtils.makeAccessible(findLoadedClassMethod);
|
||||||
ClassLoader parent = getParent();
|
ClassLoader parent = getParent();
|
||||||
while (parent != null) {
|
while (parent != null) {
|
||||||
if (ReflectionUtils.invokeMethod(findLoadedClassMethod, parent, new Object[] {className}) != null) {
|
if (ReflectionUtils.invokeMethod(findLoadedClassMethod, parent, className) != null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
parent = parent.getParent();
|
parent = parent.getParent();
|
||||||
|
|
|
||||||
|
|
@ -760,6 +760,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
|
||||||
* @param bean the original bean instance
|
* @param bean the original bean instance
|
||||||
* @return the adapted MBean, or <code>null</code> if not possible
|
* @return the adapted MBean, or <code>null</code> if not possible
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected DynamicMBean adaptMBeanIfPossible(Object bean) throws JMException {
|
protected DynamicMBean adaptMBeanIfPossible(Object bean) throws JMException {
|
||||||
Class targetClass = AopUtils.getTargetClass(bean);
|
Class targetClass = AopUtils.getTargetClass(bean);
|
||||||
if (targetClass != bean.getClass()) {
|
if (targetClass != bean.getClass()) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2007 the original author or authors.
|
* Copyright 2002-2009 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -77,7 +77,7 @@ public interface Validator {
|
||||||
* {@link #validate(Object, Errors) validate} instances of the
|
* {@link #validate(Object, Errors) validate} instances of the
|
||||||
* supplied <code>clazz</code>
|
* supplied <code>clazz</code>
|
||||||
*/
|
*/
|
||||||
boolean supports(Class clazz);
|
boolean supports(Class<?> clazz);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the supplied <code>target</code> object, which must be
|
* Validate the supplied <code>target</code> object, which must be
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
<xsd:element name="property-placeholder">
|
<xsd:element name="property-placeholder">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
Activates replacement of ${...} placeholders, resolved against the specified properties file or Properties object
|
Activates replacement of ${...} placeholders, resolved against the specified properties file or
|
||||||
(if any). Falls back to resolving placeholders against JVM system properties.
|
Properties object (if any). Falls back to resolving placeholders against JVM system properties.
|
||||||
Alternatively, define a parameterized PropertyPlaceholderConfigurer bean in the context.
|
Alternatively, define a parameterized PropertyPlaceholderConfigurer bean in the context.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
<xsd:appinfo>
|
<xsd:appinfo>
|
||||||
|
|
@ -155,23 +155,22 @@
|
||||||
<xsd:attribute name="use-default-filters" type="xsd:boolean" default="true">
|
<xsd:attribute name="use-default-filters" type="xsd:boolean" default="true">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
Indicates whether automatic detection of classes annotated with @Component, @Repository, @Service, or @Controller
|
Indicates whether automatic detection of classes annotated with @Component, @Repository, @Service,
|
||||||
should be enabled. Default is "true".
|
or @Controller should be enabled. Default is "true".
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:attribute>
|
</xsd:attribute>
|
||||||
<xsd:attribute name="annotation-config" type="xsd:boolean" default="true">
|
<xsd:attribute name="annotation-config" type="xsd:boolean" default="true">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
Indicates whether the implicit AutowiredAnnotationBeanPostProcessor and CommonAnnotationBeanPostProcessor should
|
Indicates whether the implicit annotation post-processors should be enabled. Default is "true".
|
||||||
be enabled. Default is "true".
|
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
</xsd:attribute>
|
</xsd:attribute>
|
||||||
<xsd:attribute name="name-generator" type="xsd:string">
|
<xsd:attribute name="name-generator" type="xsd:string">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
The fully-qualified classname of the BeanNameGenerator to be used for naming detected components.
|
The fully-qualified class name of the BeanNameGenerator to be used for naming detected components.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
<xsd:appinfo>
|
<xsd:appinfo>
|
||||||
<tool:annotation>
|
<tool:annotation>
|
||||||
|
|
@ -184,7 +183,8 @@
|
||||||
<xsd:attribute name="scope-resolver" type="xsd:string">
|
<xsd:attribute name="scope-resolver" type="xsd:string">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
The fully-qualified class name of the ScopeMetadataResolver to be used for resolving the scope of detected components.
|
The fully-qualified class name of the ScopeMetadataResolver to be used for resolving the scope of
|
||||||
|
detected components.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
<xsd:appinfo>
|
<xsd:appinfo>
|
||||||
<tool:annotation>
|
<tool:annotation>
|
||||||
|
|
@ -197,8 +197,8 @@
|
||||||
<xsd:attribute name="scoped-proxy">
|
<xsd:attribute name="scoped-proxy">
|
||||||
<xsd:annotation>
|
<xsd:annotation>
|
||||||
<xsd:documentation><![CDATA[
|
<xsd:documentation><![CDATA[
|
||||||
Indicates whether proxies should be generated for detected components, which may be necessary when using certain
|
Indicates whether proxies should be generated for detected components, which may be necessary
|
||||||
non-singleton scopes in a proxy-style fashion. Default is to generate no such proxies.
|
when using scopes in a proxy-style fashion. Default is to generate no such proxies.
|
||||||
]]></xsd:documentation>
|
]]></xsd:documentation>
|
||||||
</xsd:annotation>
|
</xsd:annotation>
|
||||||
<xsd:simpleType>
|
<xsd:simpleType>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue