spring中依赖注入 属性无set方法

admin 技术杂谈 2022-09-01 125 0

在bean.xml文件中添加


<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />

引用只需要@Resource name= bean.xml中的ID即可  引用不需要get set方法

评论