UniqueDong edited a comment on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-653418213


   > I don't think this is the correct way or at least I don't think this is a 
scenario we should consider here. @davsclaus what do you think?
   
   How about the following solutions?
   Implement EnvironmentAware to obtain the Spring Environment, so that the 
injected PropertyResolver of Spring can be realized rather than created by 
other components
   ```java
   class SpringPropertiesParser extends DefaultPropertiesParser implements 
EnvironmentAware {
   
       // Members
   
       private PropertyResolver propertyResolver;
        
       @Override
       public void setEnvironment(Environment environment) {
           this.propertyResolver = environment;
       }
   
       // Overridden
   
       @Override
       public String parseProperty(String key, String value, Properties 
properties) {
           return propertyResolver.getProperty(key);
       }
   
   }
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to