@Bean
CamelContextConfiguration contextConfiguration() {
return new CamelContextConfiguration() {
@Override
public void beforeApplicationStart(CamelContext context) {
// Enable Jackson JSON type converter.
context.getGlobalOptions().put(JacksonConstants.ENABLE_TYPE_CONVERTER, "true");
// Allow Jackson JSON to convert to pojo types also
// (by default Jackson only converts to String and other simple types)
getContext().getGlobalOptions().put(JacksonConstants.TYPE_CONVERTER_TO_POJO, "true");
}
@Override
public void afterApplicationStart(CamelContext camelContext) {
}
};
}
@Bean
CamelContextConfiguration contextConfiguration() {
return new CamelContextConfiguration() {
@Override
public void beforeApplicationStart(CamelContext context) {
// Enable Jackson JSON type converter.
context.getGlobalOptions().put(JacksonConstants.ENABLE_TYPE_CONVERTER, "true");
// Allow Jackson JSON to convert to pojo types also
// (by default Jackson only converts to String and other simple types)
getContext().getGlobalOptions().put(JacksonConstants.TYPE_CONVERTER_TO_POJO, "true");
}
@Override
public void afterApplicationStart(CamelContext camelContext) {
}
};
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow