典型的spring xml配置文件头部

来源:互联网 发布:直播视频美颜软件 编辑:程序博客网 时间:2024/06/05 09:10
<?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:tx="http://www.springframework.org/schema/tx"
               xmlns:aop="http://www.springframework.org/schema/aop"
               xmlns:p="http://www.springframework.org/schema/p"
               xsi:schemaLocation="http://www.springframework.org/schema/beans 
                http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
               http://www.springframework.org/schema/context 
                http://www.springframework.org/schema/context/spring-context-4.3.xsd
               http://www.springframework.org/schema/aop.xsd
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd 
               http://www.springframework.org/schema/tx 
                 http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">




<!-- <context:annotation-config />仅能够在已经在已经注册过的bean上面起作用。 -->
<!-- 但是不用担心,<context:component-scan>除了具有<context:annotation-config />的功能之外,还具有自动将带有@component,@service,@Repository等注解的对象注册到spring容器中的功能。 -->
 
 <context:annotation-config />
原创粉丝点击