|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.beans.factory.config.DeprecatedBeanWarner
public class DeprecatedBeanWarner
Bean factory post processor that logs a warning for @Deprecated
beans.
Field Summary | |
---|---|
protected Log |
logger
Logger available to subclasses. |
Constructor Summary | |
---|---|
DeprecatedBeanWarner()
|
Method Summary | |
---|---|
protected boolean |
isLogEnabled()
Determine whether the logger field is enabled. |
protected void |
logDeprecatedBean(String beanName,
BeanDefinition beanDefinition)
Logs a warning for a bean annotated with @Deprecated . |
void |
postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
Modify the application context's internal bean factory after its standard initialization. |
void |
setLoggerName(String loggerName)
Set the name of the logger to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient Log logger
Constructor Detail |
---|
public DeprecatedBeanWarner()
Method Detail |
---|
public void setLoggerName(String loggerName)
This can be specified to not log into the category of this warner class but rather into a specific named category.
LogFactory.getLog(String)
,
Logger.getLogger(String)
,
Logger.getLogger(String)
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
BeanFactoryPostProcessor
postProcessBeanFactory
in interface BeanFactoryPostProcessor
beanFactory
- the bean factory used by the application context
BeansException
- in case of errorsprotected void logDeprecatedBean(String beanName, BeanDefinition beanDefinition)
@Deprecated
.
beanName
- the name of the deprecated beanbeanDefinition
- the definition of the deprecated beanprotected boolean isLogEnabled()
logger
field is enabled.
Default is true
when the "warn" level is enabled. Subclasses can override this to change the level
under which logging occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |