【fix sonar】SpringContextHolder文件

This commit is contained in:
梁琦涛
2023-03-08 10:03:35 +08:00
parent b43181b02d
commit 8ec0e51d11
@@ -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 {
}
}
}
}