spring 注解

时间:2020-10-08 19:26:45   收藏:0   阅读:23

在使用注解注入时,需要在配置文件中导入context命名空间和注解扫描路径,多个路径之间用逗号隔开

技术图片

注意:
The use of <context:component-scan> implicitly enables the functionality of <context:annotation-config>. There is usually no need to include the <context:annotation-config> element when using <context:component-scan>.

Aop注解

    <!--在使用aop注解时需要在xml文件添加下注解-->
    <aop:aspectj-autoproxy></aop:aspectj-autoproxy>


来自为知笔记(Wiz)


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!