<?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:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd" default-autowire="byName"> <!-- @author ForeignStudent @version 2017/9/20 --> <!-- 引用外部属性文件 --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:applicationContext/spring.properties</value> </list> </property> </bean> <!-- 扫描服务层 --> <context:component-scan base-package="com.conferencerooms.service" /> <!-- aspectj aop启用CGliB代理 --> <aop:aspectj-autoproxy expose-proxy="true" proxy-target-class="true" /> <import resource="classpath:applicationContext/spring-mybatis.xml" /> <import resource="classpath:applicationContext/spring-shiro.xml" /> <import resource="classpath:applicationContext/spring-ehcache.xml" /> </beans>
这里只扫描服务层,其他都在对应的层扫描。
时间: 2024-10-11 00:07:44