@Import只負責引入javaCOnfig形式定義的Ioc容器配置,等同於<import resource="xxx.xml"/>將一個配置文件導入另一個
@Configuration @Import(CDPlayerConfig.class) @ImportResource("classpath:cons-injec.xml") //導入xml配置項 public class SoundSystemConfig {
@ImportResource負責引入xml配置
@ImportResource("classpath:cons-injec.xml") //導入xml配置項