Can I use Spring 3 formatting annotations in Java SE application?
I mean @NumberFormat, @DateFormat, or some custom format. I have a lot of Model objects and would like to extract their formatted fields in a generic way. I can’t find a way to set up proper configuration for that.
Can I use Spring 3 formatting annotations in Java SE application? I mean @NumberFormat
Share
Could be achieved using integration with Spring Conversion Services, you can take a look at
FormattingConversionServiceandFormattingConversionServiceFactoryBeanbut require some code to have clear client API. For me it was too much efforts and I went with simple@NumberFormatannotation + converter written by myself.