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

documentation : SpEL / Expression support for defining bean definitions / XML based configuration (9.4.1) [SPR-14074] #18646

Closed
spring-issuemaster opened this issue Mar 21, 2016 · 2 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Mar 21, 2016

Mathieu Stempell opened SPR-14074 and commented

The last two examples in this chapter miss the '#' SpEL prefix character :

<bean id="numberGuess" class="org.spring.samples.NumberGuess">
    <property name="randomNumber" value="{ T(java.lang.Math).random() * 100.0 }"/>

    <!-- other properties -->
</bean>

<bean id="shapeGuess" class="org.spring.samples.ShapeGuess">
    <property name="initialShapeSeed" value="{ numberGuess.randomNumber }"/>

    <!-- other properties -->
</bean>

Affects: 4.2.5

Reference URL: http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#expressions-beandef-xml-based

Referenced from: commits 2a715e9, 0c8a40b

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 21, 2016

Juergen Hoeller commented

This seems to be an asciidoc issue, leading to a single quote character within a span element and rendering the subsequent expression in the wrong format. However, an apparently analogous source renders fine in the preceding examples.

Stéphane Nicoll, have you seen this before? I might be missing something, being a rather naive asciidoc user after all...

Juergen

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Mar 21, 2016

Stéphane Nicoll commented

The quotes substitution was enabled for those example and # is a reserved keyword. I suspect a bug somewhere because the output wasn't the same for every example. In any case, I've fixed all XML example using # and backported the commit to 4.2.x .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.