美文网首页
applicationContext.xml配置详解

applicationContext.xml配置详解

作者: 如琢待磨 | 来源:发表于2019-11-12 15:32 被阅读0次
    <?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:aop="http://www.springframework.org/schema/aop"
           xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="
         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
    <!--包扫描, 扫描com.mmall包下所有文件-->
        <context:component-scan base-package="com.mmall" annotation-config="true"/>
        <!--<context:annotation-config/>-->
        <aop:aspectj-autoproxy/>
        <!--引入外部配置, 配置分离了-->
        <import resource="applicationContext-datasource.xml"/>
    </beans>
    

    相关文章

      网友评论

          本文标题:applicationContext.xml配置详解

          本文链接:https://www.haomeiwen.com/subject/kykqictx.html