zoukankan      html  css  js  c++  java
  • SSM整合-spring-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" 
            xsi:schemaLocation="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans.xsd">
    

    以上是原本的

     
     

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

    基于注解IOC时,导入约束时需要多导入一个context名称空间下的约束

     
     

    <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"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd">
    

    以上是使用aop

     
     

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

    以上是基于注解的aop













    种一棵树最好的时间是十年前,其次是现在。
  • 相关阅读:
    基于OpenSSL自建CA和颁发SSL证书
    SSL与TLS的区别以及介绍
    Ubuntu中Nginx的安装与配置
    Openssl源代码整理学习---含P7/P10/P12说明
    动态加载js文件
    常用方法
    对reducers 理解
    小复习(3)
    如何使移动web页面禁止横屏?
    九个Console命令,让 JS 调试更简单
  • 原文地址:https://www.cnblogs.com/islch/p/12800792.html
Copyright © 2011-2022 走看看