Skip to content

Commit 47a9bb1

Browse files
committed
Document that auto-configuration classes are not public API
Closes spring-projectsgh-16704
1 parent 1b62a05 commit 47a9bb1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ could have been `SecurityProperties`.
929929
* `acme.security.password`.
930930
* `acme.security.roles`, with a collection of `String`.
931931

932+
NOTE: Spring Boot auto-configuration heavily makes use of `@ConfigurationProperties` for easily
933+
configuring auto-configured beans. Similar to auto-configuration classes, `@ConfigurationProperties`
934+
classes available in Spring Boot are for internal use only. The properties that map to the class,
935+
which are configured via properties files, YAML files, environment variables etc., are public API but
936+
the content of the class itself is not meant to be used directly.
937+
932938
[NOTE]
933939
====
934940
Getters and setters are usually mandatory, since binding is through standard Java Beans

Diff for: spring-boot-project/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc

+5
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,11 @@ the list of auto-configuration classes to exclude by using the
484484

485485
TIP: You can define exclusions both at the annotation level and by using the property.
486486

487+
NOTE: Even though auto-configuration classes are `public`, the only aspect of the class
488+
that is considered public API is the name of the class which can be used for disabling the
489+
auto-configuration. The actual contents of those classes, such as nested configuration classes
490+
or bean methods are for internal use only and we do not recommend using those directly.
491+
487492
[[using-boot-spring-beans-and-dependency-injection]]
488493
== Spring Beans and Dependency Injection
489494
You are free to use any of the standard Spring Framework techniques to define your beans

0 commit comments

Comments
 (0)