use of org.apereo.cas.util.serialization.AbstractJacksonBackedStringSerializer in project cas by apereo.
the class JmsTicketRegistryConfiguration method jacksonJmsMessageConverter.
@Bean
public MessageConverter jacksonJmsMessageConverter() {
final MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
new AbstractJacksonBackedStringSerializer<Object>() {
private static final long serialVersionUID = 1466569521275630254L;
@Override
protected Class getTypeToSerialize() {
return Object.class;
}
@Override
protected ObjectMapper initializeObjectMapper() {
final ObjectMapper mapper = super.initializeObjectMapper();
converter.setObjectMapper(mapper);
return mapper;
}
};
return converter;
}
Aggregations