Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
@Component
public class InvoiceProcessor {

  @Autowired
  private TypeConverter typeConverter;

  public UUID parseInvoiceId(Invoice invoice) {
    // Using Spring's StringToUUIDConverter
    UUID id = invoice.typeConverter.convertTo(UUID.class, invoice.getId());
  }

}

 

Under the hood Camel Spring Boot delegates conversion to the Spring's ConversionService. If no ConversionService instance is available, Camel Spring Boot auto-configuration will create one for you.


Include Page
Endpoint See Also
Endpoint See Also