You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/07/03 02:21:25 UTC

[GitHub] [camel-spring-boot] UniqueDong opened a new pull request #101: fix (Environment): multiple environments

UniqueDong opened a new pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101


   Fix multiple environments when used with dubbo framework causing boot failure. 
   the dubbo class org.apache.dubbo.spring.boot.autoconfigure.DubboRelaxedBinding2AutoConfiguration#dubboScanBasePackagesPropertyResolver create a PropertyResolver causing boot failure.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] oscerd commented on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-654636360


   Since there wasn't more feedback on this and since there wasn't a clarification, I'm closing this one.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] UniqueDong commented on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
UniqueDong commented 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 PropertyResolver injected by Spring can be implemented without the PropertyResolver 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:
users@infra.apache.org



[GitHub] [camel-spring-boot] davsclaus commented on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
davsclaus commented on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-653405169


   Yeah I would like to know some more about what affect this PR does to everyone else. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] oscerd edited a comment on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
oscerd edited a comment on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-653419911


   I still don't think this is the right place for this. We never claim we are supporting dubbo, so this is something useless for camel-spring-boot user base. This is an hack you should do in your application. Just my pov


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] oscerd closed pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
oscerd closed pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] UniqueDong commented on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
UniqueDong commented on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-653393415


   > It's not completely clear what you are doing. Dubbo is not among the camel-spring-boot starters, we don't have support for it. Please explain a bit better the scenario and why camel-spring-boot should be involved.
   
   My program running environment is dubbo. Now I need to introduce the camel-ftp component to read the ftp protocol data and execute the rpc call through dubbo. Since dubbo also created a PropertyResolver to prevent the program from starting, it is specified by @Qualifier("environment") The propertyResolver property of org.apache.camel.spring.boot.SpringPropertiesParser uses Spring's StandardEnvironment


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] oscerd commented on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-653419911


   I still don't think this is the right place for this. We never claim we are supporting dunno, so this is something useless for camel-spring-boot user base. This is an hack you should do in your application. Just my pov


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] oscerd commented on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #101:
URL: https://github.com/apache/camel-spring-boot/pull/101#issuecomment-653402644


   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?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-spring-boot] UniqueDong edited a comment on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
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?
   
   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:
users@infra.apache.org



[GitHub] [camel-spring-boot] UniqueDong edited a comment on pull request #101: fix (Environment): multiple environments

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org