Well played Zoran, well played.Ok as I wait for IntelliJ to finish digesting Camel I have two follow-up questions
1. Digging in some more, perhaps this is more my expectations. I am using a @Configuration class with @PropertySources.In my RouteBuilder I have some existing @PropertyInject variables and those seem to get the correct values from the aforementioned @Configuration class.
But Simple language interpretation of properties is not getting the values from the Spring class.
So this: @PropertyInject(value ="reindexer.port") private int restPortNum;returns the expected value from the the properties file loaded in the configuration class.
But .to("xslt:{{xslt.path}}/FOXML.xslt?transformerFactory=#xsltTransformer") results in .to("xslt:classpath:/FOXML.xslt?transformerFactory=#xsltTransformer") instead of the expected .to("xslt:file:/tmp/FOXML.xslt?transformerFactory=#xsltTransformer")Using Spring Boot means it auto-configures a property parser and my own causes a conflict.
I can use @PropertyInject to inject all the properties and then rewrite the above as
.to("xslt:" + XSLT_PATH + "/FOXML.xslt?transformerFactory=#xsltTransformer") but I wanted to check that I was not missing something obvious. **************2. Is there documentation on how to test the adoc production (I've never used adoc before) so I don't make ugly pages edits?
cheers, jared On 2020-12-10 12:12 p.m., Zoran Regvart wrote:
Hi Jared, thanks for bringing this to our attention, I'm sure that we have more of these issues throughout the documentation. I'm looking at the old source[1] of documentation and for whatever reason the formatting is broken there, so that could be the reason why when we migrated the page over to Asciidoc that didn't carry over. Seems to point to snippets in CamelSpringPropertyPlaceholderConfigurerTest.xml[2]. I wonder if you can see if that makes sense and update the documentation to fix this, there's a "Edit this page" link top right, that'll take you directly to the source editor on GitHub to create a pull request. The syntax to include a snippet via tags should look like this[3]. Thanks :) zoran [1] https://cwiki.apache.org/confluence/display/CAMEL/Properties [2] https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/component/properties/CamelSpringPropertyPlaceholderConfigurerTest.xml [3] https://github.com/apache/camel/blob/master/docs/user-manual/modules/ROOT/pages/testing.adoc#L81-L84 On Thu, Dec 10, 2020 at 6:11 PM Jared Whiklo <jwhi...@gmail.com> wrote:Hi, I'm learning how to use Camel in a Spring Boot environment and have most everything working except properties. I was looking at the explanation for bridging the two here https://camel.apache.org/components/latest/properties-component.html#_bridging_spring_and_camel_property_placeholders It says: > To bridge Spring and Camel you must define a single bean as shown below: but then doesn't actually have the example. Perhaps I misunderstood the text, but could someone give me an example of the required bean? cheers, jared -- Jared Whiklo jwhi...@gmail.com
-- Jared Whiklo jwhi...@gmail.com
OpenPGP_signature
Description: OpenPGP digital signature