手动获取容器对象时,报no qualifying bean of type is defined, 经过调查,发现手动获取的时候,该类所在的包必须经过spring容器初始化. 1.SpringConfigHolder 代码,添加@Component进行ioc package com.xxxxxxx.utils.holder; import org.springframework.beans.BeansException; import org.springframework.context.Ap…