Skip to content

Commit f176342

Browse files
Merge pull request #40157 from snicoll
* pr/40157: Clarify requirements for -parameters and constructor binding Closes gh-40157
2 parents 9d9ea5c + ab22b15 commit f176342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/external-config.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ include::code:nonnull/MyProperties[tag=*]
742742
NOTE: To use constructor binding the class must be enabled using `@EnableConfigurationProperties` or configuration property scanning.
743743
You cannot use constructor binding with beans that are created by the regular Spring mechanisms (for example `@Component` beans, beans created by using `@Bean` methods or beans loaded by using `@Import`)
744744

745-
NOTE: To use constructor binding in a native image the class must be compiled with `-parameters`.
745+
NOTE: To use constructor binding the class must be compiled with `-parameters`.
746746
This will happen automatically if you use Spring Boot's Gradle plugin or if you use Maven and `spring-boot-starter-parent`.
747747

748748
NOTE: The use of `java.util.Optional` with `@ConfigurationProperties` is not recommended as it is primarily intended for use as a return type.

0 commit comments

Comments
 (0)