|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2019 the original author or authors. |
| 2 | + * Copyright 2002-2020 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
23 | 23 | import java.lang.annotation.Target;
|
24 | 24 |
|
25 | 25 | /**
|
26 |
| - * Annotation at the field or method/constructor parameter level |
27 |
| - * that indicates a default value expression for the affected argument. |
| 26 | + * Annotation used at the field or method/constructor parameter level |
| 27 | + * that indicates a default value expression for the annotated element. |
28 | 28 | *
|
29 |
| - * <p>Typically used for expression-driven dependency injection. Also supported |
30 |
| - * for dynamic resolution of handler method parameters, e.g. in Spring MVC. |
| 29 | + * <p>Typically used for expression-driven or property-driven dependency injection. |
| 30 | + * Also supported for dynamic resolution of handler method arguments — for |
| 31 | + * example, in Spring MVC. |
31 | 32 | *
|
32 |
| - * <p>A common use case is to assign default field values using |
33 |
| - * <code>#{systemProperties.myProp}</code> style expressions. |
| 33 | + * <p>A common use case is to inject values using |
| 34 | + * <code>#{systemProperties.myProp}</code> style SpEL (Spring Expression Language) |
| 35 | + * expressions. Alternatively, values may be injected using |
| 36 | + * <code>${my.app.myProp}</code> style property placeholders. |
34 | 37 | *
|
35 | 38 | * <p>Note that actual processing of the {@code @Value} annotation is performed
|
36 | 39 | * by a {@link org.springframework.beans.factory.config.BeanPostProcessor
|
|
55 | 58 | public @interface Value {
|
56 | 59 |
|
57 | 60 | /**
|
58 |
| - * The actual value expression — for example, <code>#{systemProperties.myProp}</code>. |
| 61 | + * The actual value expression such as <code>#{systemProperties.myProp}</code> |
| 62 | + * or property placeholder such as <code>${my.app.myProp}</code>. |
59 | 63 | */
|
60 | 64 | String value();
|
61 | 65 |
|
|
0 commit comments