From 25f2d4c900b545ae32a61333637a5a2c375a05ba Mon Sep 17 00:00:00 2001
From: Ian Luo <ian.luo@gmail.com>
Date: Tue, 5 Mar 2019 16:01:36 +0800
Subject: [PATCH] [DUBBO-3476]: NullPointerException happened when using
 SpringContainer.getContext() (#3600)

*     #3476: NullPointerException happened when using SpringContainer.getContext()

* rollback change for DEFAULT_SPRING_CONFIG
---
 .../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 32f2475a07a..884fe098e32 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 void start() {
         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();
     }