类 DeprecatedBeanWarner

    • 字段详细资料

      • logger

        protected transient Log logger
        Logger available to subclasses.
    • 方法详细资料

      • setLoggerName

        public void setLoggerName​(String loggerName)
        Set the name of the logger to use. The name will be passed to the underlying logger implementation through Commons Logging, getting interpreted as log category according to the logger's configuration.

        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)
      • logDeprecatedBean

        protected void logDeprecatedBean​(String beanName,
                                         Class<?> beanType,
                                         BeanDefinition beanDefinition)
        Logs a warning for a bean annotated with @Deprecated.
        参数:
        beanName - the name of the deprecated bean
        beanType - the user-specified type of the deprecated bean
        beanDefinition - the definition of the deprecated bean
      • writeToLog

        protected void writeToLog​(String message)
        Actually write to the underlying log.

        The default implementations logs the message at "warn" level.

        参数:
        message - the message to write
      • isLogEnabled

        protected boolean isLogEnabled()
        Determine whether the 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.