Commit 3f528bb0 authored by Stephane Nicoll's avatar Stephane Nicoll

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
parent c37b9b8a
/*
* 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 {
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment