mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix cod
This commit is contained in:
parent
248af7e2bc
commit
553ecda5d1
@ -71,7 +71,11 @@ public class SpringUtil implements BeanFactoryPostProcessor, ApplicationContextA
|
||||
* @since 5.7.0
|
||||
*/
|
||||
public static ListableBeanFactory getBeanFactory() {
|
||||
return null == beanFactory ? applicationContext : beanFactory;
|
||||
final ListableBeanFactory factory = null == beanFactory ? applicationContext : beanFactory;
|
||||
if(null == factory){
|
||||
throw new UtilException("No ConfigurableListableBeanFactory or ApplicationContext injected, maybe not in the Spring environment?");
|
||||
}
|
||||
return factory;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user