码迷,mamicode.com
首页 > 编程语言 > 详细

spring+springMVC+mybatis+shiro -- spring-config.xml

时间:2017-09-25 22:02:41      阅读:268      评论:0      收藏:0      [点我收藏+]

标签:oms   pos   instance   encoding   cache   port   hold   mvc   ehcache   

<?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>

这里只扫描服务层,其他都在对应的层扫描。

spring+springMVC+mybatis+shiro -- spring-config.xml

标签:oms   pos   instance   encoding   cache   port   hold   mvc   ehcache   

原文地址:http://www.cnblogs.com/foreign-student/p/7593955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!