spring基础说明01-schema

来源:互联网 发布:win7网络唤醒 编辑:程序博客网 时间:2024/04/29 09:39

一个简单的配置

<beans xmlns="http://www.springframework.org/schema/beans"    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xmlns:p="http://www.springframework.org/schema/p"    xmlns:aop="http://www.springframework.org/schema/aop"    xmlns:context="http://www.springframework.org/schema/context"    xmlns:tx="http://www.springframework.org/schema/tx"    xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd         http://www.springframework.org/schema/context         http://www.springframework.org/schema/context/spring-context-3.0.xsd         http://www.springframework.org/schema/aop         http://www.springframework.org/schema/aop/spring-aop-3.0.xsd         http://www.springframework.org/schema/tx          http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"></bean>

说明

xmlns="http://www.springframework.org/schema/beans": 初始化bean的格式文件地址xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance": 辅助初始化beanxmlns:p="http://www.springframework.org/schema/p": p标签代替写<property>xmlns:aop="http://www.springframework.org/schema/aop": aop编程xmlns:context="http://www.springframework.org/schema/context": spring上下文,包括资源文件相关xmlns:tx="http://www.springframework.org/schema/tx": tx:transaction
0 0
原创粉丝点击