Commit 5984d4ee authored by Andy Wilkinson's avatar Andy Wilkinson

Index @ConfigurationProperties so they can be found by scanning

Previously, @ConfigurationProperties was not annotated with @Indexed.
This meant that @ConfigurationPropertiesScan would not be able to
find them when the underlying
ClassPathScanningCandidateComponentProvider is using a
CandidateComponentsIndex.

This commit annotated @ConfigurationProperties with @Indexed so that
they can be found by index-based scanning.

Fixes gh-26459
parent 44447492
/*
* 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.
......@@ -23,6 +23,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Indexed;
/**
* Annotation for externalized configuration. Add this to a class definition or a
......@@ -46,6 +47,7 @@ import org.springframework.core.annotation.AliasFor;
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Indexed
public @interface ConfigurationProperties {
/**
......
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