gaoxun250@sina.com
2023-03-10 273b282af6f74403a0b13d2694beb4b7f48edaf6
src/main/java/com/genersoft/iot/vmp/utils/SpringBeanFactory.java
@@ -33,9 +33,11 @@
    /**
     * 获取对象 这里重写了bean方法,起主要作用
     */
    public static Object getBean(String beanId) throws BeansException {
        if (applicationContext == null) return null;
        return applicationContext.getBean(beanId);
    public static  <T> T getBean(String beanId) throws BeansException {
        if (applicationContext == null) {
            return null;
        }
        return (T) applicationContext.getBean(beanId);
    }
    /**