applicationContext.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"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">

<bean id="messagebean" class="org.tarena.bean.MessageBean">
<property name="moduleName" value="资费管理"></property>
<property name="pageSize" value="5"></property>
<property name="username" value="scott"></property>
<property name="password" value="tiger"></property>

<property name="someList">
<list>
<value>北京</value>
<value>上海</value>
<value>广州</value>
</list>
</property>
<property name="someSet">
<set>
<value>James Gosling</value>
<value>Martin fowler</value>
<value>Larry Ellision</value>
</set>
</property>
<property name="someMap">
<map>
<entry key="1001" value="Java语言基础"></entry>
<entry key="1002" value="Java Web基础"></entry>
<entry key="1003" value="Spring 使用基础"></entry>
</map>
</property>
<property name="someProps">
<props>
<prop key="username">root</prop>
<prop key="password">1234</prop>
</props>
</property>
</bean>

</beans>

时间: 2024-07-28 20:23:08

applicationContext.xml配置的相关文章

applicationContext.xml 配置

以下是详解Spring的applicationContext.xml文件代码: <!-- 头文件,主要注意一下编码 --> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd&qu

Spring的配置文件ApplicationContext.xml配置头文件解析

Spring的配置文件ApplicationContext.xml配置头文件解析 原创 2016年12月16日 14:22:43 标签: spring配置文件 5446 spring中的applicationContext.xml配置头文件解析 <?xmlversion="1.0"encoding="UTF-8"?> <beansxmlns="http://www.springframework.org/schema/beans"

springmvc.xml和applicationContext.xml配置的特点

1:springmvc.xml配置要点 一般它主要配置Controller的组件扫描器和视图解析器 下为:springmvc.xml文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-

web.xml配置错误导致applicationContext.xml配置重复加载

web.xml相关配置 <context-param><param-name>log4jRefreshInterval</param-name><param-value>60000</param-value></context-param><context-param><param-name>contextConfigLocation</param-name><param-value>c

spring的applicationContext.xml配置SessionFactory抛异常

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">  <property name="dataSource" ref="dataSource"></property>  <property name="hibernateProperties&

Spring 整合hibernate和mybatis的 applicationContext.xml的配置

Spring整合hibernate的applicationContext.xml配置 1.注解方式的实现 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x

spring applicationContext.xml和hibernate.cfg.xml设置

applicationContext.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" xmlns:context="http://ww

Spring 基于xml配置方式的AOP

我们具体用代码来说明: 1.ArithmeticCalculator.java 1 package com.proc; 2 3 public interface ArithmeticCalculator { 4 int add(int i, int j); 5 int sub(int i, int j); 6 7 int mul(int i, int j); 8 int div(int i, int j); 9 } 2.ArithmeticCalculatorImpl.java 实现接口Arit

关于常用的web.xml、applicationContext.xml与springMVC-servlet.xml

一.关于web.xml配置 这个没啥好说的,web启动需要加载的文件都扔这里. <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation=&qu