Skip to content

Commit eb5822d

Browse files
linkian209snicoll
authored andcommitted
Document behavior of @value with non-idiomatic format
See spring-projectsgh-49054 Signed-off-by: Ian Drake <linkian209@gmail.com>
1 parent d40ec74 commit eb5822d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ If you do want to use javadoc:org.springframework.beans.factory.annotation.Value
13441344
This will allow Spring Boot to use the same logic as it does when xref:features/external-config.adoc#features.external-config.typesafe-configuration-properties.relaxed-binding[relaxed binding] javadoc:org.springframework.boot.context.properties.ConfigurationProperties[format=annotation].
13451345
13461346
For example, `@Value("${demo.item-price}")` will pick up `demo.item-price` and `demo.itemPrice` forms from the `application.properties` file, as well as `DEMO_ITEMPRICE` from the system environment.
1347-
If you used `@Value("${demo.itemPrice}")` instead, `demo.item-price` and `DEMO_ITEMPRICE` would not be considered.
1347+
If you used `@Value("${demo.itemPrice}")` instead, `demo.item-price` would not be considered; however, `DEMO_ITEMPRICE` from the environment would still be considered.
13481348
====
13491349

13501350
If you define a set of configuration keys for your own components, we recommend you group them in a POJO annotated with javadoc:org.springframework.boot.context.properties.ConfigurationProperties[format=annotation].

0 commit comments

Comments
 (0)