camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pocock (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8126) PropertyInject does nothing for setter method
Date Fri, 05 Dec 2014 13:39:12 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-8126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14235476#comment-14235476
] 

Daniel Pocock commented on CAMEL-8126:
--------------------------------------

I tried putting a breakpoint in the setter method.  The method is never called (as opposed
to the possibility that it was being invoked with a null argument)


> PropertyInject does nothing for setter method
> ---------------------------------------------
>
>                 Key: CAMEL-8126
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8126
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.0
>         Environment: Linux, JDK1.7, standalone Camel/Spring J2SE process running in Eclipse
>            Reporter: Daniel Pocock
>
> Using the annotation @PropertyInject on a setter method of the RouteBuilder class doesn't
appear to set the value.
> public class RouteBuilder extends SpringRouteBuilder {
>         private String fooBar;	
> 	@PropertyInject("foo.bar")
>         private void setFooBar(String fooBar) {
>                this.fooBar = fooBar;
>         }
>         @Override
>         public void configure() throws Exception {
> 		
> 		logger.info("foo.bar = {}", fooBar);
>         }
>         ...
> }
> The log output says "fooBar = null"
> Using the {{ }} notation in endpoint URIs is working though.
> 	



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message