spring从容器中取bean
@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");
浙公网安备 33010602011771号