if (context == null) {\r
context = new ClassPathXmlApplicationContext(\r
getApplicationContextLocation());\r
+ if(getIsStartContext())\r
+ context.start();\r
}\r
return context;\r
}\r
+ \r
+ /** Whether the context should be started after being created. */\r
+ protected Boolean getIsStartContext(){\r
+ return false;\r
+ }\r
\r
/** Returns a bean from the underlying context */\r
+ @SuppressWarnings(value = { "unchecked" })\r
protected <T> T getBean(String beanId) {\r
return (T) getContext().getBean(beanId);\r
}\r