Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Javadoc for @Value regarding supported expressions #25284

Closed
pxm7459 opened this issue Jun 19, 2020 · 1 comment
Closed

Improve Javadoc for @Value regarding supported expressions #25284

pxm7459 opened this issue Jun 19, 2020 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Milestone

Comments

@pxm7459
Copy link

pxm7459 commented Jun 19, 2020

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 #.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 19, 2020
@sbrannen
Copy link
Member

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.

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 19, 2020
@sbrannen sbrannen added this to the 5.2.8 milestone Jun 19, 2020
@sbrannen sbrannen self-assigned this Jun 19, 2020
@sbrannen sbrannen changed the title @Value annotaion bug Improve Javadoc for @Value regarding supported expressions Jun 19, 2020
FelixFly pushed a commit to FelixFly/spring-framework that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

3 participants