To follow up on this it appears we're missing some documentation. To get this to work you need to add a provider which explicitly loads the JSR 310 module. In your deployment you can just add something like:
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
@Provider
@Produces(MediaType.APPLICATION_JSON)
public class JacksonDatatypeJacksonProducer implements ContextResolver<ObjectMapper> {
private final ObjectMapper json;
public JacksonDatatypeJacksonProducer() throws Exception {
this.json = JsonMapper.builder()
.findAndAddModules()
.build();
}
@Override
public ObjectMapper getContext(Class<?> objectType) {
return json;
}
}
That should activate the JSR 310 serializer. You also don't need to include the dependencies in the jboss-deployment-structure.xml.