Spring autoWire resource Spring配置文件问题 自定义注解 并注入spring

来源:互联网 发布:淘宝订单号查询在哪里 编辑:程序博客网 时间:2024/05/19 00:39

@resource 能够使用name属性区分两个同type 不同className的类 autowire不能

autowire有必选属性 如果没有这个属性编译会报错


Spring.xml配置

 xmlns:aop="http://www.springframework.org/schema/aop"

 xsi:schemaLocation="http://www.springframework.org/schema/aop   http://www.springframework.org/schema/aop/spring-aop-4.0.xsd”

这样才能完成配置一个 两者不可缺少(包括那种什么什么strict也是这个错误)




1 0
原创粉丝点击