mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Mark SpringBootConfiguration as Indexed
Previously, users of the components.index could not use the index in scenario where Spring Boot needs to locate the SpringBootConfiguration to use to bootstrap the test context, as AnnotatedClassFinder scans the classpath for that stereotype specifically and that requires a dedicated entry for it. This commit makes sure that a SpringBootConfiguration-annotated type has a dedicated entry in the components index. Closes gh-26308
This commit is contained in:
parent
c37b9b8a8e
commit
3f528bb0eb
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -25,6 +25,7 @@ import java.lang.annotation.Target;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.AliasFor;
|
||||
import org.springframework.stereotype.Indexed;
|
||||
|
||||
/**
|
||||
* Indicates that a class provides Spring Boot application
|
||||
@ -44,6 +45,7 @@ import org.springframework.core.annotation.AliasFor;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Configuration
|
||||
@Indexed
|
||||
public @interface SpringBootConfiguration {
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user