spring中依赖注入 属性无set方法
在bean.xml文件中添加
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
引用只需要@Resource name= bean.xml中的ID即可 引用不需要get set方法
在bean.xml文件中添加
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
引用只需要@Resource name= bean.xml中的ID即可 引用不需要get set方法
评论