steps2-->myAction

import org.springframework.context.ApplicationContext;     
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class EmergencyCarInfoAction extends AbstractBaseAction{
@Autowired//对Bean的属性变量.属性Setter方法以及构造函数进行标注,
配合 AutowiredAnnotationBeanProcessor完成Bean的自动配置.

@Qualifier("infoService")//指定注入 Bean 的名称,消除同名歧义
private InfoService infoService;
}
posted on 2012-01-06 11:19  it_code  阅读(282)  评论(0编辑  收藏  举报