You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/06/05 23:31:10 UTC

[GitHub] [servicecomb-java-chassis] WillemJiang commented on a change in pull request #1234: [SCB-1297]Environment parsing failed to fix

WillemJiang commented on a change in pull request #1234: [SCB-1297]Environment parsing failed to fix
URL: https://github.com/apache/servicecomb-java-chassis/pull/1234#discussion_r290974046
 
 

 ##########
 File path: foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigurationSpringInitializer.java
 ##########
 @@ -197,7 +197,11 @@ private void getProperties(ConfigurableEnvironment environment, PropertySource<?
     if (propertySource instanceof EnumerablePropertySource) {
       EnumerablePropertySource<?> enumerablePropertySource = (EnumerablePropertySource<?>) propertySource;
       for (String propertyName : enumerablePropertySource.getPropertyNames()) {
-        configFromSpringBoot.put(propertyName, environment.getProperty(propertyName, Object.class));
+        try {
+          configFromSpringBoot.put(propertyName, environment.getProperty(propertyName, Object.class));
+        } catch (Exception e) {
+          LOGGER.warn("set up spring property source failed. msg: {}", e.getMessage());
 
 Review comment:
   It's better to include the stack trace for more information.

----------------------------------------------------------------
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


With regards,
Apache Git Services