Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C9D30200D18 for ; Wed, 11 Oct 2017 10:41:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C7D871609E4; Wed, 11 Oct 2017 08:41:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 18FE21609CA for ; Wed, 11 Oct 2017 10:41:32 +0200 (CEST) Received: (qmail 55496 invoked by uid 500); 11 Oct 2017 08:41:31 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 55475 invoked by uid 99); 11 Oct 2017 08:41:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2017 08:41:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8B5A41A26B6 for ; Wed, 11 Oct 2017 08:41:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.802 X-Spam-Level: X-Spam-Status: No, score=-2.802 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id CPQl5Am8HNdd for ; Wed, 11 Oct 2017 08:41:28 +0000 (UTC) Received: from mail1.bemta5.messagelabs.com (mail1.bemta5.messagelabs.com [195.245.231.149]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 13AF85F569 for ; Wed, 11 Oct 2017 08:41:27 +0000 (UTC) Received: from [85.158.136.67] by server-13.bemta-5.messagelabs.com id 87/B5-31015-139DDD95; Wed, 11 Oct 2017 08:41:21 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCIsWRWlGSWpSXmKPExsWyU+uNga7hzbu RBh+3C1u8+TuD2YHR4+eCWYwBjFGsmXlJ+RUJrBl7d39iLOjmrTg0VaiB8SdXFyMXh5DAPkaJ zTtmMUE4xxklpix8AeRwcrAJmEj8WbaTEcQWETCVePvrBguILSzgK3FtxX+oeLDEjzdr2CBsP YnPl76B9bIIqErsmDCRvYuRg4NXwEdi4RRDkDCjgIrE8Vkt7CA2s4C4xKZn31lBbAkBAYkle8 4zQ9iiEi8f/4OKG0hsXbqPBcJWkLh4YQ4zRK+exI2pU9ggbG2JZQtfg8V5BQQlTs58wjKBUWg WkhWzkLTMQtIyC0nLAkaWVYzqxalFZalFumZ6SUWZ6RkluYmZObqGBqZ6uanFxYnpqTmJScV6 yfm5mxiBIc4ABDsYpzY4H2KU5GBSEuVVmHM3UogvKT+lMiOxOCO+qDQntfgQowwHh5IEr/QNo JxgUWp6akVaZg4w2mDSEhw8SiK86iBp3uKCxNzizHSI1ClGXY4jD+/8YRJiycvPS5US53UBKR IAKcoozYMbAYv8S4yyUsK8jEBHCfEUpBblZpagyr9iFOdgVBLmtQSZwpOZVwK36RXQEUxAR4i m3QE5oiQRISXVwOi8iOOOuZ+t4m3hSaf3abNFrcj5MH0xd73Apnv5DTIOr2z6fn/Jk9m+TSK2 4G73EYd09pD+TU/OnlB4aXlP58VW4a8X4uqOzMtqULsXbeSx1b/z9LkZ320fN7anBx7rc/zi2 V+8I3r9MY570TUpSyf1vGRc8MC9duve7cdnWTWoXMl9LPzc8aUSS3FGoqEWc1FxIgDCL7LS9w IAAA== X-Env-Sender: florian.posch@performgroup.com X-Msg-Ref: server-9.tower-207.messagelabs.com!1507711281!22571434!1 X-Originating-IP: [185.42.236.48] X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=performgroup.com,-,- X-VirusChecked: Checked Received: (qmail 26122 invoked from network); 11 Oct 2017 08:41:21 -0000 Received: from webmail.rball.com (HELO webmail.rball.com) (185.42.236.48) by server-9.tower-207.messagelabs.com with AES256-GCM-SHA384 encrypted SMTP; 11 Oct 2017 08:41:21 -0000 Received: from GBINXEXC702.Runningball.local (10.12.19.111) by GBINXEXC702.Runningball.local (10.12.19.111) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 11 Oct 2017 09:41:20 +0100 Received: from GBINXEXC702.Runningball.local ([fe80::a0ec:98b:43a:d8fd]) by GBINXEXC702.Runningball.local ([fe80::a0ec:98b:43a:d8fd%16]) with mapi id 15.00.1293.004; Wed, 11 Oct 2017 09:41:20 +0100 From: Florian Posch To: "users@camel.apache.org" Subject: Camel Spring Boot: Bean initialization skipped in auto-configuration Thread-Topic: Camel Spring Boot: Bean initialization skipped in auto-configuration Thread-Index: AdNCbBzvKot0alrbScmg/qKuwvqOzg== Date: Wed, 11 Oct 2017 08:41:20 +0000 Message-ID: Accept-Language: de-AT, en-US, en-GB Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.12.19.240] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 archived-at: Wed, 11 Oct 2017 08:41:34 -0000 Hi, I'm using Camel 2.19.3 and Spring Boot 1.5.7 including the corresponding Ca= mel starter for my application and am having some issues with a custom Infl= ightRepository getting set up. It is defined as Spring @Component and should get applied to the context by= auto-configuration but the problem is that the bean isn't properly initial= ized @Component public class MyInflightRepository extends DefaultInflightRepository { =09 @Autowired private MyInjectedBean bean; =09 // ... } The repository gets applied to the CamelContext as well as it is available = but to me it looks as if premature bean access in CamelAutoConfiguration.af= terPropertiesSet causes the bean not being initialiized properly (so @Auto= wired members remain null but Spring starts up without an error). As far as= I understood this happens because Application.getBeansByType(...) gets cal= led before all property resolvers are initialized. I was able to work around that by manually initializing my InflightReposito= ry and setting it in a CamelConfiguration bean but for my taste this is a b= it dangerous to scan for custom beans that might not get initialized proper= ly during startup. There's a more detailed snippet given on my Stackoverflow post: https://sta= ckoverflow.com/questions/46680985/spring-boot-camel-autowiring-issues-in-ca= mel-components=20 Any question, please let me know... Kind regards, Florian Florian Posch // Software Engineer T=A0=A0 - RunningBall Sports Information GmbH=20 M=A0 - Plabutscher Stra=DFe 63=20 F=A0=A0 - 8051 Graz=20 E=A0=A0 florian.posch@performgroup.com=20 Austria=20 Skype rb.fposch W www.performgroup.com