git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @PropertyInject vs @Value in camel-spring-boot


Hi

Can you post the stacktrace, and can you tell a bit about where you
put that @ProjectInject.
And what version of camel and SB are you using. And have you tried
with a newer version

On Sat, Mar 17, 2018 at 6:03 AM, Wilson MacGyver <wmacgyver@xxxxxxxxx> wrote:
> Hi there,
>
> I'm using camel-spring-boot
>
> I add
>
> hello = world in my application.properties
>
> I notice if I use
>
> @PropertyInject("hello")
> private String hello
>
> I get
>
>  Property with key not found in properties from text
>
> but if I use
>
> @Value("${hello}")
>
> it works.
>
> this surprise me, since I was under the impression that per doc, camel uses
> spring to resolve all the properties if you use camel-spring-boot. but yet
> somehow spring can find the value from applicaiton.properties, but camel
> can not?
>
> am I missing something?
>
> --
> Omnem crede diem tibi diluxisse supremum.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03155.html on line 117
Call Stack
#TimeMemoryFunctionLocation
10.0006363576{main}( ).../msg03155.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03155.html on line 117
Call Stack
#TimeMemoryFunctionLocation
10.0006363576{main}( ).../msg03155.html:0