Announcement Announcement Module
No announcement yet.
TypeDescriptor internals Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • TypeDescriptor internals


    I recently upgraded from spring framework 3.0.5 to 3.1 and unfortunately I was relying on some internal workings of TypeDescriptor (org.springframework.core.convert.TypeDescriptor). In particular, I was using the field and method information that was stored in the TypeDescriptor version 3.0.5. In 3.1 this information is gone, I guess done for good reason. I was using that information in my custom converters.

    I'm looking for some hints how to inject / define some bean that would be used to create my own TypeDescriptor(s). Or perhaps some other way, using a custom data binder perhaps. I'm looking for a global type of solution, I don't want to add anything into each controller. Too bad there is no factory for TypeDescriptors one can inject, they are created using constructors.

    My problem is that I have an object of type Date, however, depending on what the field name is I want to convert it to YYYYMMDD or YYYY format.

    Any help is appreciated.

    Thank you.