@Autowired 使用@Autowired标签注入ApplicationContext packagecom.tntxia.bean; importorg.springframework.beans.factory.annotation.Autowired; importorg.springframework.context.ApplicationContext; importorg.springframework.stereotype.Component; @Component publicclassUser{ @Autowired privateApplicationContex...