<?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应用的更多相关文章

  1. 《SSM框架搭建》三.整合spring web

    感谢学习http://blog.csdn.net/zhshulin/article/details/37956105#,还是修改了spring到最新的版本和接口开发示例 根据前一篇日志,已经有了myb ...

  2. Spring Web应用的最大瑕疵

    众所周知, 现在的Spring框架已经成为构建企业级Java应用事实上的标准了,众多的企业项目都构建在Spring项目及其子项目之上,特别是Java Web项目,很多都使用了Spring并且遵循着We ...

  3. 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架构模式,可 ...

  4. spring web.xml 难点配置总结

    web.xml web.xml是所有web项目的根源,没有它,任何web项目都启动不了,所以有必要了解相关的配置. ContextLoderListener,ContextLoaderServlet, ...

  5. Spring web应用最大的败笔

    第一篇 介绍下IOC DI Spring主要是业务层框架,现在已经发展成为一个完整JavaEE开发框架,它的主要特点是IoC DI和AOP等概念的融合,强项在面向切面AOP.推出之初因为Ioc/AOP ...

  6. 菜鸟学习Spring Web MVC之二

    有文章从结构上详细讲解了Spring Web MVC,我个菜鸟就不引据来讲了.说说强悍的XP环境如何配置运行环境~~ 最后我配好的环境Tomcat.Spring Tool Suites.Maven目前 ...

  7. 4.Spring Web MVC处理请求的流程

  8. 1.Spring Web MVC有什么

    Spring Web MVC使用了MVC架构模式的思想,将web层进行职责解耦. 同样也是基于请求驱动的,也就是使用请求-响应模型.它主要包含如下组件: DispatcherServlet :前端控制 ...

  9. Spring Web Flow使用

    就当我写(嘘,抄)着玩的. 使用Spring框架的一个子项目--Spring Web Flow来建立和管理Web应用和UI流程. 第一节:使用Spring Web Flow在一个Spring MVC应 ...

  10. Spring Web Flow 简介

    Spring Web Flow 简介 博客分类: 转载 SSH 最近在TSS上看到了一片介绍Spring Web Flow的文章,顺便就翻译了下来,SWF的正式版估计要到6月份才能看到了,目前的例子都 ...

随机推荐

  1. VC中C++数值范围的确定

    1. Visual C++ 32 位和 64 位编译器可识别本文后面的表中的类型. 如果其名称以两个下划线 (__) 开始,则数据类型是非标准的. 下表中指定的范围均包含起始值和结束值. 类型名称 字 ...

  2. Scala_针对集合的操作

    针对集合的操作 遍历操作 列表的遍历 scala> val list = List(1,2,3,4,5,6) list: List[Int] = List(1, 2, 3, 4, 5, 6) s ...

  3. redis解决保存快照失败后redis无法写入的问题

    通过关闭配置项stop-writes-on-bgsave-error解决该问题. redis 127.0.0.1:6379> config set stop-writes-on-bgsave-e ...

  4. 转:Ubuntu 10.10 安装后上不了网的原因

    最近新装了个Ubuntu10.10 发现上不了网,折腾了很久,在网上找了很多办法都不行,最后试了一招居然管用了.特此总结下Ubuntu了网的原因及对策分析. 环境:Ubuntu 10.10网络: 通过 ...

  5. phpStudy模式下安装ssl证书,详细版

    phpStudy模式下安装ssl证书,详细版 2017年12月16日 14:27:38 骑着蚂蚁追大象 阅读数:4232 标签: phpstudy安装ssl证书 更多 个人分类: php   版权声明 ...

  6. RocketMQ概述

    概述 ApacheRocketMQ是一个低延时.高性能.可靠.海量并且灵活扩展性的分布式消息和流平台,于2017年9月25日成为Apache基金会顶级开源项目.它由4个部分组成:name server ...

  7. 检查.net dll构建的目标平台是any cpu、x86、x64

    有时候,需要检查构建的dll是否针对正确的平台 可以使用CorFlags.exe(它是.NET Framework SDK的一部分)从dll中查找此信息.运行CorFlags.exe将产生以下输出: ...

  8. 【推荐】介绍两款Windows资源管理器,Q-Dir 与 FreeCommander XE(比TotalCommander更易用的免费资源管理器)

    你是否也像我一样,随着硬盘.文件数量的增加,而感到对于文件的管理越来越乏力. 于是我试用了传说中的各种软件,包括各种Explorer外壳,或者第三方资源管理器. 最后我确定下来经常使用,并推荐给您的是 ...

  9. InfluxDB 安装以及使用

    InfluxDB InfluxDB简介: InfluxDB 是一个开源分布式时序.事件和指标数据库.使用Go语言编写,无需外部依赖.其设计目标是实现分布式和水平伸缩扩展.        它有三大特性: ...

  10. 【转】javascript深入理解js闭包

    原文:http://www.jb51.net/article/24101.htm 闭包(closure)是Javascript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现. 一.变量的作 ...