【fix sonar】SpringContextHolder文件
This commit is contained in:
+7
-3
@@ -20,8 +20,12 @@ public class SpringContextHolder implements ApplicationContextAware {
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
// NOSONAR
|
||||
SpringContextHolder.applicationContext = applicationContext;
|
||||
synchronized (SpringContextHolder.class){
|
||||
if(SpringContextHolder.applicationContext == null){
|
||||
// NOSONAR
|
||||
SpringContextHolder.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,4 +82,4 @@ public class SpringContextHolder implements ApplicationContextAware {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user