zoukankan      html  css  js  c++  java
  • spring+springMVC+mybatis+shiro -- spring-config.xml

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

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

  • 相关阅读:
    xmselect动态渲染(单选和多选)
    Python数据挖掘学习进度11(pandas高级处理)
    Mysql:DML-增删改表中数据
    Mysql:DDL-操作数据库、表
    mybatis实现增删改查操作
    mybatis的入门(环境的部署)
    Redis
    web综合案例:登录界面,注册界面,忘记密码等功能实现
    git常用命令实践
    在IntelliJ IDEA中使用git
  • 原文地址:https://www.cnblogs.com/foreign-student/p/7593955.html
Copyright © 2011-2022 走看看