zoukankan      html  css  js  c++  java
  • spring配置文件介绍

    spring的配置文件比较固定,这里以springmvc的配置文件为例介绍,beans是根标签,xmlns是name space的简称,一般xmlns有beansXMLSchema-instancemvccontext

    、tx。xml中用到什么标签必须要在xmlns中注明。下面的schemaLocation地址是上面声明所要遵守的规范。

    <?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:mvc="http://www.springframework.org/schema/mvc"
          xmlns:context="http://www.springframework.org/schema/context"
            
          xsi:schemaLocation="
          http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        
          http://www.springframework.org/schema/mvc
          http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
            
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-3.0.xsd
          ">
        
        <!-- 将带有注解的类加入到spring容器中 -->
        <context:component-scan base-package="cn.itcast.javaee.springmvc.app15"/>
        
    </beans>      
  • 相关阅读:
    链表和顺序表的区别
    MongoDB安装了以后,服务无法启动的问题
    retrying模块
    Scrapy 动态创建 Item
    pyhon把程序打包为whl
    记录有个关于使用matplotlib库绘图遇到的坑
    读取Polygon多边形的顶点坐标
    Scatter 散点图
    tick 能见度
    Annotation 标注
  • 原文地址:https://www.cnblogs.com/wangxiaochao/p/9317152.html
Copyright © 2011-2022 走看看