Excerpt from the Javadoc for @Value
:
public @interface Value {
/**
* The actual value expression: for example {@code #{systemProperties.myProp}}.
*/
String value();
}
The actual value expression should be ${systemProperties.myProp}
, using $
instead of #
.
Comment From: sbrannen
That #
denotes that it is a SpEL (Spring Expression Language) expression.
As such, it is valid syntax.
Your proposed change represents a property placeholder.
However, the current documentation is unclear about what type of "expression" is being demonstrated.
Thus, I am repurposing this issue to improve the documentation.