You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by vi...@apache.org on 2019/03/05 08:01:42 UTC

[incubator-dubbo] branch master updated: [DUBBO-3476]: NullPointerException happened when using SpringContainer.getContext() (#3600)

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

victory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 25f2d4c  [DUBBO-3476]: NullPointerException happened when using SpringContainer.getContext() (#3600)
25f2d4c is described below

commit 25f2d4c900b545ae32a61333637a5a2c375a05ba
Author: Ian Luo <ia...@gmail.com>
AuthorDate: Tue Mar 5 16:01:36 2019 +0800

    [DUBBO-3476]: NullPointerException happened when using SpringContainer.getContext() (#3600)
    
    *     #3476: NullPointerException happened when using SpringContainer.getContext()
    
    * rollback change for DEFAULT_SPRING_CONFIG
---
 .../main/java/org/apache/dubbo/container/spring/SpringContainer.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java b/dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java
index 32f2475..884fe09 100644
--- a/dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java
+++ b/dubbo-container/dubbo-container-spring/src/main/java/org/apache/dubbo/container/spring/SpringContainer.java
@@ -46,7 +46,8 @@ public class SpringContainer implements Container {
         if (StringUtils.isEmpty(configPath)) {
             configPath = DEFAULT_SPRING_CONFIG;
         }
-        context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+"));
+        context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+"), false);
+        context.refresh();
         context.start();
     }