Configurations

abstract class Configurations

A set of @Configuration classes that can be registered in ApplicationContext. Classes can be returned from one or more Configurations instances by using getClasses. The resulting array follows the ordering rules usually applied by the ApplicationContext and/or custom ImportSelector implementations.

This class is primarily intended for use with tests that need to specify configuration classes but can't use SpringRunner.

Implementations of this class should be annotated with @Order or implement Ordered.

Author

Phillip Webb

Since

2.0.0

See also

Inheritors

Functions

Link copied to clipboard
open fun collate(configurations: Collection<Configurations>): List<Configurations>
Collate the given configuration by sorting and merging them.
Link copied to clipboard
open fun getBeanName(beanClass: Class<out Any>): String
Return the bean name that should be used for the given configuration class or null to use the default name.
Link copied to clipboard
open fun getClasses(configurations: Collection<Configurations>): Array<Class<out Any>>
open fun getClasses(configurations: Array<Configurations>): Array<Class<out Any>>
Return the classes from all the specified configurations in the order that they would be registered.