Browse Source

sonar 严重修复

wangyj18 6 years ago
parent
commit
ac8b57f99a
1 changed files with 5 additions and 1 deletions
  1. 5 1
      push-server/src/com/ai/server/util/BeanHolder.java

+ 5 - 1
push-server/src/com/ai/server/util/BeanHolder.java

@ -7,11 +7,15 @@ import org.springframework.context.ApplicationContextAware;
7 7
public class BeanHolder implements ApplicationContextAware{
8 8
	private static ApplicationContext context;
9 9
	
10
	private static void setContext(ApplicationContext context) {
11
		BeanHolder.context = context;
12
	}
13

10 14
	@Override
11 15
	public void setApplicationContext(ApplicationContext applicationContext)
12 16
			throws BeansException {
13 17
		// TODO Auto-generated method stub
14
		BeanHolder.context = applicationContext;
18
		setContext(applicationContext);
15 19
	}
16 20
	
17 21
	public static Object getBean(String name) {