@Service
public class CommandServiceImpl implements ICommandService{
@Autowired
ApplicationContext applicationContext;
......
//从容器中获取指令实现类实例
Object o=applicationContext.getBean("xxx");
public class CommandServiceImpl implements ICommandService{
@Autowired
ApplicationContext applicationContext;
......
//从容器中获取指令实现类实例
Object o=applicationContext.getBean("xxx");