-
Notifications
You must be signed in to change notification settings - Fork 493
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
data-th-field doesn't use formatters in Spring Boot application #495
Comments
I am unable to reproduce this, using the same annotation and the same data type. Check this (non-Spring Boot) sandbox app: Entity: https://github.com/thymeleaf/thymeleafsandbox-springjsp/blob/master/src/main/java/thymeleafsandbox/springjsp/business/entities/User.java#L34-L35 Could you please give me more details: what specific version of Spring Framework is being used in this Spring Boot app? Thymeleaf… I suppose we are talking about 2.1.4, right? Is the conversion service being explicitly configured for looking at annotations? For example in XML configuration you'd need something like: <mvc:annotation-driven conversion-service="conversionService"/> BTW: in a |
Thank you @danielfernandez: This is a simple proof created using Spring Initializr tool, including
I suppose that conversionService is correctly configured as
I just upload the proof in https://github.com/DISID/disid-proofs/tree/master/spring-boot-thymeleaf-field-problem so you can check it. Thank you very much!!! |
I've got it:
So, to solve it I must change this request mapping definition:
by this one:
Thank you. Regards, |
Correct, that's what I was just seeing too, but I wanted to make sure that it was not in the Thymeleaf side, basically that Spring is not expecting the So I made the equivalent to this using JSP and Spring's taglib and I can confirm behaviour is the same: Spring does not create |
According to #223 for this entity:
and this template:
should use Spring Formatters to transform values but I get:
As you can see, span with th-text formats values as expected, but input with th-field doesn't.
Is this a regression? Is there any configuration missing?
Thank you in advance.
Note: I try it with Spring boot 1.3.4 and 1.3.3
Note 2: There is a post in StackOverflow about it.
The text was updated successfully, but these errors were encountered: