[jboss-jira] [JBoss JIRA] (WFLY-10616) ContextResolver doesn't work

Jason Greene (JIRA) issues at jboss.org
Thu Aug 30 17:47:05 EDT 2018


     [ https://issues.jboss.org/browse/WFLY-10616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Greene updated WFLY-10616:
--------------------------------
    Fix Version/s: 15.0.0.Alpha1
                       (was: 14.0.0.Final)


> ContextResolver doesn't work
> ----------------------------
>
>                 Key: WFLY-10616
>                 URL: https://issues.jboss.org/browse/WFLY-10616
>             Project: WildFly
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 13.0.0.Final
>            Reporter: George Trudeau
>            Assignee: R Searls
>             Fix For: 15.0.0.Alpha1
>
>         Attachments: test.war
>
>
> I have a simple ContextResolver to set Date serialization format for my JAX-RS service, it works on 12.0.0.Final but it doesn't anymore on 13.0.0.Final :
> {code:java}
> @Provider
> public class DateResolver implements ContextResolver<ObjectMapper>
> {
>     private final ObjectMapper mapper;
>     public DateResolver()
>     {
>         mapper = new ObjectMapper();
>         mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
>         mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
>     }
>     @Override
>     public ObjectMapper getContext(Class<?> type) { return mapper; }
> }
> {code}
> The {{getContext}} method isn't called on 13.0.0.Final.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list