spring xmlns 配置
来源:互联网 发布:数组未赋值,默认为什么 编辑:程序博客网 时间:2024/05/17 05:58
一、引入spring jar包 最好不用struts中的因为struts中的版本比较低 引用方式有两种
1、直接引用spring.jar包
2.model中的所有引用 只差一个junit.jar测试包
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:application-context.xml(这里可以放多个xml文件 用空格分开)</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class
</listener>
注意不要放到struts标签中
<?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:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
">
</beans>
------------------------------------3.0----------------------------
<?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: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/tx
http://www.springframework.org/schema/tx/spring-tx-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">
</beans>
配置基本完成
- spring xmlns 配置
- [Spring] Spring配置文件头部xmlns配置
- spring配置文件头部xmlns配置解说
- Spring application-context.xml 的 xmlns配置
- spring配置文件头部xmlns配置 详细解释
- spring配置文件头部xmlns配置解说
- 学spring之xmlns配置之命名空间
- Spring - beans的xmlns
- spring 配置文件的 完整xmlns
- spring 3.0 xmlns
- xmlns
- xmlns
- xmlns
- xmlns
- xmlns
- spring mvc web.xml 配置出现 Attribute "xmlns:xsi" must be declared for element type "web-app"
- Spring配置文件(xml)中的xmlns解析
- xml之xmlns 以及spring task
- apache 配置文件 httpd-vhosts.conf 添加一个站点NameVirtualHost *:80
- 黑马程序员--HEML基础
- VC++快捷键
- javascript 中的preventDefault和stopPropagation
- BFS——NYOJ 21 三个水杯
- spring xmlns 配置
- 堆和栈
- 让总结催化你的收获
- Drupal 模块开发的时候,如何取到数组中的值?
- 开放封闭原则,依赖倒转原则
- Money Systems (01背包,累加计数)
- C语言文件操作函数大全
- Extjs4 Grid 使用总结
- DBWR和LGWR在什么情况下执行写?