Luigi De Masi created CAMEL-23790:
-------------------------------------
Summary: Add Camel Spring Boot integration for YAML deserializer
resolver provider SPI
Key: CAMEL-23790
URL: https://issues.apache.org/jira/browse/CAMEL-23790
Project: Camel
Issue Type: Improvement
Components: camel-yaml-dsl, dsl
Reporter: Luigi De Masi
CAMEL-23775 adds a generic YAML DSL extension mechanism based on
{{YamlDeserializerResolver}} and {{YamlDeserializerResolverProvider}}.
The default YAML DSL behavior still works for normal Camel Spring Boot
applications because the default provider keeps classpath-based resolver
discovery.
However, Camel Spring Boot does not currently provide a Spring Boot-specific
integration point for configuring or replacing the resolver provider.
This follow-up should add Camel Spring Boot integration for the new provider
SPI.
h3. Goal
Allow Spring Boot applications and starters to configure YAML deserializer
resolver discovery through normal Spring Boot mechanisms, while ensuring the
provider is installed before YAML routes are parsed.
h3. Implementation notes
* If a Spring bean of type {{YamlDeserializerResolverProvider}} is
available, Camel Spring Boot should install it as a Camel context plugin.
* The installation should happen early enough, before YAML route
parsing/route collection.
* {{CamelContextCustomizer}} is likely the appropriate integration point
because it is applied during Camel context configuration before routes are
loaded.
* {{CamelContextConfiguration.beforeApplicationStart}} should not be used
for this because it runs after route configuration.
* The default behavior should remain unchanged when no custom provider bean
is present.
* Spring Boot native/AOT implications should be evaluated. If needed, this
issue may add runtime hints or document how applications/starters should provide
hints for custom resolver implementations.
h3. Acceptance criteria
* A Spring Boot application can provide a
{{YamlDeserializerResolverProvider}} bean.
* Camel Spring Boot installs that provider as a Camel context plugin before
YAML routes are parsed.
* Custom YAML route step deserializers provided through the provider can be
used by YAML routes.
* Existing classpath-based resolver discovery continues to work when no
provider bean is configured.
* Existing registry-based {{YamlDeserializerResolver}} lookup continues to
work.
* Tests cover provider bean registration and YAML route parsing with a
custom step.
* Native/AOT behavior is either supported with appropriate hints or
explicitly documented.
h3. Related
* CAMEL-23775
--
This message was sent by Atlassian Jira
(v8.20.10#820010)