-
Notifications
You must be signed in to change notification settings - Fork 37.7k
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
Make formatter value configurable through Spring EL/Property PlaceHolder [SPR-7087] #11747
Comments
Juergen Hoeller commented Finally committed to trunk - will be available in tonight's 3.0.3 snapshot. We simply support standard ${...} placeholders in formatting annotations now, like we did for Juergen |
Donny A. Wijaya commented Sample project to simulate the error |
Donny A. Wijaya commented Hi Juergen, I tried the new feature with the nightly 3.0.3 jar from maven repo. Unfortunately for me, I experienced this exception:
I've attached the zip to simulate this error in previous post. In User.java, I used ${dateTime.pattern} for DateTimeFormat's pattern. In the application.properties, I have dateTime.pattern property with value MM/dd/yyyy. The error happened when I opened the User Add form at: http://localhost:8080/basic/admin/user/add |
Juergen Hoeller commented Good catch - things only worked with a plain FormattingConversionService; we were missing FormattingConversionServiceFactoryBean (as used by the mvc namespace). Fixed for tonight's 3.0.3 snapshot... Juergen |
Donny A. Wijaya commented Hi Juergen, It works!! I tested on both field and method level. Thanks a ton for this nice feature :) Donny |
adrian commented Hi, from what I've tested, this issue resolves values only from placeholders. Could it be enhanced to resolve from SpEl :
For more information, see http://forum.springsource.org/showthread.php?113518-DateTimeFormat-and-pattern-i18n. WDYT ? |
Donny A. Wijaya opened SPR-7087 and commented
It would be great if we are allowed to configure the formatter (and validator) value through Spring EL or Property PlaceHolder
For example:
and in application.properties loaded by Property PlaceHolder
Affects: 3.0.2
Attachments:
Issue Links:
Referenced from: commits 2a140ad
The text was updated successfully, but these errors were encountered: