Package net.shibboleth.shared.spring.config

# Class DeprecatedBeanDetector

java.lang.Object
net.shibboleth.shared.spring.config.DeprecatedBeanDetector

All Implemented Interfaces:
  `EventListener`, `ApplicationListener<ContextRefreshedEvent>`

public class DeprecatedBeanDetector extends Object implements ApplicationListener<ContextRefreshedEvent>
A utility bean to look for and warn about deprecated bean names.

In practice this is difficult to use effectively because it has to be run only after all other beans are in place, so it's best-suited to injection into application workflows such that it's deliberately used at a known point in the process.

Since:
  6.1.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Map<String,String>`
`beanNames`
Deprecated bean names.
`private final String`
`warnContext`
Context for log warnings.

## Constructor Summary

Constructors
Constructor
Description
`DeprecatedBeanDetector(Map<String,String> map, String logContext)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`onApplicationEvent(ContextRefreshedEvent event)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.context.ApplicationListener

`supportsAsyncExecution`

## Field Details

### warnContext

@Nullable private final String warnContext
Context for log warnings.

### beanNames

@Nonnull private final Map<String,String> beanNames
Deprecated bean names.

## Constructor Details

### DeprecatedBeanDetector

public DeprecatedBeanDetector(@Nonnull Map<String,String> map, @Nullable String logContext)
Constructor.

Parameters:
  `map` - bean names to detect with replacements identified
  `logContext` - context for log warnings

## Method Details

### onApplicationEvent

public void onApplicationEvent(@Nonnull ContextRefreshedEvent event)

Specified by:
  `onApplicationEvent` in interface `ApplicationListener<ContextRefreshedEvent>`