public class DeprecatedBeanWarner extends ObjectSE implements BeanFactoryPostProcessor
@Deprecated
SE Bean の警告を記録する Bean ファクトリポストプロセッサー。コンストラクターと説明 |
---|
DeprecatedBeanWarner() |
修飾子と型 | メソッドと説明 |
---|---|
protected boolean | isLogEnabled() logger フィールドが有効かどうかを確認します。 |
protected void | logDeprecatedBean(StringSE beanName, ClassSE<?> beanType, BeanDefinition beanDefinition) @Deprecated SE でアノテーションされた Bean の警告をログに記録します。 |
void | postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) 標準の初期化後に、アプリケーションコンテキストの内部 Bean ファクトリを変更します。 |
void | setLoggerName(StringSE loggerName) 使用するロガーの名前を設定します。 |
protected void | writeToLog(StringSE message) 実際に基になるログに書き込みます。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
protected transient Log logger
public void setLoggerName(StringSE loggerName)
これは、このワーナークラスのカテゴリではなく、特定の名前付きカテゴリにログインするように指定できます。
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
BeanFactoryPostProcessor
BeanFactoryPostProcessor
の postProcessBeanFactory
beanFactory
- アプリケーションコンテキストで使用される Bean ファクトリ BeansException
- エラーの場合 protected void logDeprecatedBean(StringSE beanName, ClassSE<?> beanType, BeanDefinition beanDefinition)
@Deprecated
SE でアノテーションされた Bean の警告をログに記録します。beanName
- 非推奨の Bean の名前 beanType
- 非推奨の Bean のユーザー指定型 beanDefinition
- 非推奨の Bean の定義 protected void writeToLog(StringSE message)
デフォルトの実装では、「警告」レベルでメッセージを記録します。
message
- 書き込むメッセージ protected boolean isLogEnabled()
logger
フィールドが有効かどうかを確認します。「警告」レベルが有効な場合、デフォルトは true
です。サブクラスはこれをオーバーライドして、ロギングが発生するレベルを変更できます。