Srping 注解注入

来源:互联网 发布:远视 眼镜 知乎 编辑:程序博客网 时间:2024/06/10 00:09

注解注入 加入 <context:annotation-config/>程序无法运行

<?xml version="1.0" encoding="UTF-8"?><beans      xmlns="http://www.springframework.org/schema/beans"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:tx="http://www.springframework.org/schema/tx"     xmlns:aop="http://www.springframework.org/schema/aop"     xmlns:p="http://www.springframework.org/schema/p"              xmlns:context="http://www.springframework.org/schema/context"      xsi:schemaLocation="http://www.springframework.org/schema/beans                          <a target=_blank href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</a>                         <a target=_blank href="http://www.springframework.org/schema/context">http://www.springframework.org/schema/context</a>                         <a target=_blank href="http://www.springframework.org/schema/context/spring-context-3.0.xsd">http://www.springframework.org/schema/context/spring-context-3.0.xsd</a>                         http://www.springframework.org/schema/aop                            <a target=_blank href="http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">http://www.springframework.org/schema/aop/spring-aop-2.5.xsd</a>                            <a target=_blank href="http://www.springframework.org/schema/tx">http://www.springframework.org/schema/tx</a>                            <a target=_blank href="http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">http://www.springframework.org/schema/tx/spring-tx-2.5.xsd</a>"                                               default-autowire="byName">    <context:annotation-config/>    <bean>       。       。       。   </bean></beans>
必须加入aop初步猜测 注解注入是基于切面的所以,aop就显得至关重要了。




0 0