spring web应用
<?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:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" 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/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="propertyConfigurer" class="com.sf.integration.common.util.SSSPropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:server.properties</value>
<value>classpath:config.properties</value>
</list>
</property>
</bean>
<import resource="classpath:com/sf/remoting/server/META-INF/config/beans-server.xml" ></import>
<import resource="classpath:com/sf/remoting/server/META-INF/config/beans-database.xml" />
<import resource="classpath:com/sf/integration/common/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/ocrAddress/META-INF/config/beans.xml"/>
</beans>
ApplicationContext ctx = new ClassPathXmlApplicationContext("int-kafka-context.xml");
//初始化SpringContextUtil
SpringContextUtil.init(ctx);
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/beans.xml</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>webApp.root</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.xml</param-value>
</context-param>
<listener>
<listener-class>
com.sf.integration.common.listener.SSSLog4jConfigListener
</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>sss_new-ds</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
beans.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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="propertyConfigurer" class="com.sf.integration.common.util.SSSPropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${CONF_PATH}/*.properties</value>
</list>
</property>
</bean>
<!--jndi配置方式-->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="sss_new-ds" />
<property name="resourceRef" value="true" />
</bean>
<!--<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@10.202.46.36:1521:ssssit"/>
<property name="username" value="sssks"></property>
<property name="password" value="sssks"></property>
<property name="maxActive" value="5"></property>
<property name="maxIdle" value="2"></property>
<property name="maxWait" value="10"></property>
</bean>-->
<bean id="sessionFactoryAutowiring" class="com.sf.framework.server.core.deploy.SessionFactoryAutowiring">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="defaultLobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" lazy-init="true"/>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>com/sf/integration/common/META-INF/config/mapping.xml</value>
<value>com/sf/integration/schtblcustaddr/META-INF/config/mapping.xml</value>
<value>com/sf/integration/billhasreached/META-INF/config/mapping.xml</value>
<value>com/sf/integration/hht/META-INF/config/mapping.xml</value>
<value>com/sf/integration/rms/META-INF/config/mapping.xml</value>
<value>com/sf/integration/bill/META-INF/config/mapping.xml</value>
<value>com/sf/integration/uploadidentrs/META-INF/config/mapping.xml</value>
<value>com/sf/integration/uploadEasyinput/META-INF/config/mapping.xml</value>
<value>com/sf/integration/uploadaddridentlog/META-INF/config/mapping.xml</value>
<value>com/sf/integration/perauilog/META-INF/config/mapping.xml</value>
<value>com/sf/integration/abroadident/META-INF/config/mapping.xml</value>
<value>com/sf/integration/expimage/META-INF/config/mapping.xml</value>
<value>com/sf/integration/addrinputrs/META-INF/config/mapping.xml</value>
<value>com/sf/integration/bag/META-INF/config/mapping.xml</value>
<value>com/sf/integration/unload/META-INF/config/mapping.xml</value>
<value>com/sf/integration/waybillpicup/META-INF/config/mapping.xml</value>
<value>com/sf/integration/waitaddrckinbuff/META-INF/config/mapping.xml</value>
<value>com/sf/integration/upTtWaitArtifidentUpLog/META-INF/config/mapping.xml</value>
<value>com/sf/integration/uploadtelsnap/META-INF/config/mapping.xml</value>
<value>com/sf/integration/uploadsortfaillog/META-INF/config/mapping.xml</value>
<value>com/sf/integration/uploadDeptDel/META-INF/config/mapping.xml</value>
<value>com/sf/integration/updateNewIdentLog/META-INF/config/mapping.xml</value>
<value>com/sf/integration/sysauilog/META-INF/config/mapping.xml</value>
<value>com/sf/integration/addrInfo/META-INF/config/mapping.xml</value>
<value>com/sf/integration/telhissrc/META-INF/config/mapping.xml</value>
<!--<value>com/sf/integration/config/META-INF/config/mapping.xml</value>-->
<value>com/sf/integration/uploadProblemWaybillRs/META-INF/config/mapping.xml</value>
<value>com/sf/integration/ocrAddress/META-INF/config/mapping.xml</value>
</list>
</property>
<!--
<property name="mappingLocations">
<list>
<value>classpath:/com/sf/integration/*/META-INF/config/mapping.xml</value>
</list>
</property>
-->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.jdbc.batch_size">50</prop>
</props>
</property>
<property name="lobHandler" ref="defaultLobHandler" />
</bean>
<!--
<import resource="classpath:com/sf/integration/*/META-INF/config/beans.xml"/>
-->
<import resource="classpath:com/sf/integration/common/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/billhasreached/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/schtblcustaddr/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/hht/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/rms/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/bill/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/uploadidentrs/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/uploadEasyinput/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/uploadaddridentlog/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/perauilog/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/abroadident/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/expimage/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/addrinputrs/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/bag/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/unload/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/waybillpicup/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/waitaddrckinbuff/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/upTtWaitArtifidentUpLog/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/uploadtelsnap/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/uploadsortfaillog/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/uploadDeptDel/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/updateNewIdentLog/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/sysauilog/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/addrInfo/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/telhissrc/META-INF/config/beans.xml"/>
<!--<import resource="classpath:com/sf/integration/config/META-INF/config/beans.xml"/>-->
<import resource="classpath:com/sf/integration/uploadProblemWaybillRs/META-INF/config/beans.xml"/>
<import resource="classpath:com/sf/integration/ocrAddress/META-INF/config/beans.xml"/>
</beans>
spring web应用的更多相关文章
- 《SSM框架搭建》三.整合spring web
感谢学习http://blog.csdn.net/zhshulin/article/details/37956105#,还是修改了spring到最新的版本和接口开发示例 根据前一篇日志,已经有了myb ...
- Spring Web应用的最大瑕疵
众所周知, 现在的Spring框架已经成为构建企业级Java应用事实上的标准了,众多的企业项目都构建在Spring项目及其子项目之上,特别是Java Web项目,很多都使用了Spring并且遵循着We ...
- Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->Spring Framework中的spring web MVC模块
spring framework中的spring web MVC模块 1.概述 spring web mvc是spring框架中的一个模块 spring web mvc实现了web的MVC架构模式,可 ...
- spring web.xml 难点配置总结
web.xml web.xml是所有web项目的根源,没有它,任何web项目都启动不了,所以有必要了解相关的配置. ContextLoderListener,ContextLoaderServlet, ...
- Spring web应用最大的败笔
第一篇 介绍下IOC DI Spring主要是业务层框架,现在已经发展成为一个完整JavaEE开发框架,它的主要特点是IoC DI和AOP等概念的融合,强项在面向切面AOP.推出之初因为Ioc/AOP ...
- 菜鸟学习Spring Web MVC之二
有文章从结构上详细讲解了Spring Web MVC,我个菜鸟就不引据来讲了.说说强悍的XP环境如何配置运行环境~~ 最后我配好的环境Tomcat.Spring Tool Suites.Maven目前 ...
- 4.Spring Web MVC处理请求的流程
- 1.Spring Web MVC有什么
Spring Web MVC使用了MVC架构模式的思想,将web层进行职责解耦. 同样也是基于请求驱动的,也就是使用请求-响应模型.它主要包含如下组件: DispatcherServlet :前端控制 ...
- Spring Web Flow使用
就当我写(嘘,抄)着玩的. 使用Spring框架的一个子项目--Spring Web Flow来建立和管理Web应用和UI流程. 第一节:使用Spring Web Flow在一个Spring MVC应 ...
- Spring Web Flow 简介
Spring Web Flow 简介 博客分类: 转载 SSH 最近在TSS上看到了一片介绍Spring Web Flow的文章,顺便就翻译了下来,SWF的正式版估计要到6月份才能看到了,目前的例子都 ...
随机推荐
- js-实现双色球功能
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&qu ...
- SRM465
250pt: 给定50个整数点,范围-500-500之间.然后在这些点上选2个点作为中心,画边长为整数的正方形,并且正方形不能重叠(可以不平行),而且而且边长不同为不同方案.求有多少种方案.. 思路: ...
- Screen、IP
主要内容 Screen 安装screen [root@TS-DEV ~]# yum install screen [root@TS-DEV ~]# rpm -qa|grep screen screen ...
- Java学习--循环语句1
1. break public class BreakDemo{ // 完成一个四则运算的功能 public static void main(String args[]){ for(int i=0; ...
- 有人在用fastReport作报表时处理过字体自动缩小的问题吗,怎么做
有人在用fastReport作报表时处理过字体自动缩小的问题吗,怎么做 我来答 浏览 49 次 1个回答 #吃瓜大会# Angelababy演技被吐槽, 你觉得她的演技怎么样? 最佳答案 热心 ...
- 转:iOS9的新特性以及适配方案
2015年9月8日,苹果宣布iOS 9操作系统的正式版在太平洋时间9月16日正式推出,北京时间9月17日凌晨1点推送. 新的iOS 9系统比iOS8更稳定,功能更全面,而且还更加开放.iOS 9加入了 ...
- StringBuffer 详解 (String系列之3)
本章介绍StringBuffer以及它的API的详细使用方法. 转载请注明出处:http://www.cnblogs.com/skywang12345/p/string03.html StringBu ...
- dev gridview自动列宽和单元、行、checkbox选中和多选
#region 自动列宽 for (int I = 0; I < gridView1.Columns.Count; I++) { this.gridView1.BestFitColumns(); ...
- 【转】JS浮点数运算Bug的解决办法
37.5*5.5=206.08 (JS算出来是这样的一个结果,我四舍五入取两位小数) 我先怀疑是四舍五入的问题,就直接用JS算了一个结果为:206.08499999999998 怎么会这样,两个只有一 ...
- 【Java基础】反射和注解
前言 在Java中,反射机制和注解机制一直是一个很重要的概念,那么他们其中的原理是怎么样呢,我们不仅仅需要会使用,更要知其然而之所以然. 目录 反射机制 反射如何使用 注解定义 注解机制原理 注解如何 ...