Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
In the old OSGi blueprint/spring xml via <beans> they had special support for configuring data formats globally in <dataFormats>. This is not in the DSL model of camel-core.
We could considering add this, so its out of the box in xml-io and yaml DSL as well.
However you would then refer to these global dataformats using <custom ref="xxx"> style such as:
<bean id="aesKey" class="SpringCryptoDataFormat" factory-method="getAESKey" /> <bean id="initializationVector" class="SpringCryptoDataFormat" factory-method="getIV" /> <bean id="gcmParamSpec" class="SpringCryptoDataFormat" factory-method="getGCMParameterSpec" /> <!-- embed Camel with routes --> <camelContext xmlns="http://camel.apache.org/schema/spring"> <dataFormats> <crypto id="aes-gcm-encryption" algorithm="AES/GCM/NoPadding" keyRef="aesKey" algorithmParameterRef="gcmParamSpec" /> </dataFormats> <route> <from uri="timer:xml?period=1000"/> <setBody> <simple>Hello Camel from ${routeId}</simple> </setBody> <log message="Orig: ${body}"/> <marshal><custom ref="aes-gcm-encryption" /></marshal> <log message="Encrypted: ${body}"/> <unmarshal><custom ref="aes-gcm-encryption" /></unmarshal> <log message="Decrypted: ${body}"/> </route> </camelContext>
Attachments
Issue Links
- relates to
-
CAMEL-21401 camel-core - Custom bean in DSL using factory method should avoid ClassCastException
- Resolved