// 启动时指定的profile包含有profile1或profiles的时候实例化
@Service
@Profile({'profile1', 'profile2'})
public class Printer2 implements Printer {
}
// '不包含profile1或不包含profile2的时候实例化
@Service
@Profile({'!profile1', '!profile2'})
public class Printer2 implements Printer {
}
@Service
@Profile({'profile1', 'profile2'})
public class Printer2 implements Printer {
}
// '不包含profile1或不包含profile2的时候实例化
@Service
@Profile({'!profile1', '!profile2'})
public class Printer2 implements Printer {
}
