You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/12/14 08:22:19 UTC

[camel-spring-boot] branch master updated (15356d9 -> 977e2d8)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git.


    from 15356d9  [create-pull-request] automated change
     new 86074f4  CAMEL-15940: camel-spring-boot - Property placeholder should use spring environment at a higher level to support all of springs placeholder features.
     new 977e2d8  Polished

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/camel/spring/boot/CamelAutoConfiguration.java   | 6 ++----
 .../java/org/apache/camel/spring/boot/SpringPropertiesParser.java   | 6 +++---
 2 files changed, 5 insertions(+), 7 deletions(-)


[camel-spring-boot] 01/02: CAMEL-15940: camel-spring-boot - Property placeholder should use spring environment at a higher level to support all of springs placeholder features.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 86074f4b465482fd5ea56b4a566af2618be90030
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 13 15:35:29 2020 +0100

    CAMEL-15940: camel-spring-boot - Property placeholder should use spring environment at a higher level to support all of springs placeholder features.
---
 .../java/org/apache/camel/spring/boot/SpringPropertiesParser.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringPropertiesParser.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringPropertiesParser.java
index f917410..ac3cb4d 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringPropertiesParser.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/SpringPropertiesParser.java
@@ -19,20 +19,20 @@ package org.apache.camel.spring.boot;
 import org.apache.camel.component.properties.DefaultPropertiesParser;
 import org.apache.camel.component.properties.PropertiesLookup;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.PropertyResolver;
+import org.springframework.core.env.Environment;
 
 class SpringPropertiesParser extends DefaultPropertiesParser {
 
     // Members
 
     @Autowired
-    private PropertyResolver propertyResolver;
+    private Environment env;
 
     // Overridden
 
     @Override
     public String parseProperty(String key, String value, PropertiesLookup properties) {
-        return propertyResolver.getProperty(key);
+        return env.getProperty(key);
     }
 
 }


[camel-spring-boot] 02/02: Polished

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 977e2d86a281d4c5b1992deef94f5b5dac97e195
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 13 15:35:35 2020 +0100

    Polished
---
 .../java/org/apache/camel/spring/boot/CamelAutoConfiguration.java   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
index 5b4a4be..2f96cdb 100644
--- a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
+++ b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
@@ -117,10 +117,8 @@ public class CamelAutoConfiguration {
             Environment env = applicationContext.getEnvironment();
             if (env instanceof ConfigurableEnvironment) {
                 MutablePropertySources sources = ((ConfigurableEnvironment) env).getPropertySources();
-                if (sources != null) {
-                    if (!sources.contains("camel-file-configuration")) {
-                        sources.addFirst(new FilePropertySource("camel-file-configuration", applicationContext, config.getFileConfigurations()));
-                    }
+                if (!sources.contains("camel-file-configuration")) {
+                    sources.addFirst(new FilePropertySource("camel-file-configuration", applicationContext, config.getFileConfigurations()));
                 }
             }
         }