摘要: 1. 给参数注入,执行set方法 在set方法上面添加注解的,一定要在Class上添加@Component注解,这样Spring才能扫描到。 如果用xml配置扫描包。需要加载spring-mvc.xml。 2.给中间变量赋值 初始化操作顺序:Constructor>>@Autowired>>@Pos 阅读全文
posted @ 2018-09-13 09:44 想变瘦的胖子 阅读(4405) 评论(0) 推荐(0)