Menu

#305 Spring integration of custom converters does not work.

Dozer v5.3.2
open
nobody
5
2011-01-09
2011-01-09
Anonymous
No

I tried the custom converter integration with Spring but I cannot make it work. The patch in attachment highlights the problem.

I am willing to implement the correction if necessary. But so far I do not see how to do so that the injected custom converter is returned by MappingProcessor.getClassMap(...);

Discussion

  • Fuzail Sarang

    Fuzail Sarang - 2011-01-13

    I believe the problem is that you haven't told dozer to use your custom converter.
    You need to add it to a mapping file first, since your test is converting Strings rather than objects you will need to specify it as part of the global configuration.

    check the documentation here:
    http://dozer.sourceforge.net/documentation/customconverter.html
    and
    http://dozer.sourceforge.net/documentation/globalConfiguration.html

    I use Spring injected custom converters heavily in my project and they do work as expected.
    Regards

     

Log in to post a comment.

MongoDB Logo MongoDB