applicationContext.xml配置详解

2019-11-12  本文已影响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>
上一篇下一篇

猜你喜欢

热点阅读