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月份才能看到了,目前的例子都 ...
随机推荐
- Codeforces Beta Round #27 E. Number With The Given Amount Of Divisors 含n个约数最小数
http://codeforces.com/problemset/problem/27/E RT,求含n个约数的最小的数 我们设答案p = 2^t1 * 3^t2 * -- * p^tk(其中p是第k ...
- HDU1025贫富平衡
做01背包做到的这个LIS,常见的n2会超时,所以才有nlogn可行 先来介绍一下n2 dp[i] 表示该序列以a[i]为结尾的最长上升子序列的长度 所以第一层循环循环数组a,第二层循环循环第i个元素 ...
- node API
看了这么久nodejs,它包含哪些基础的API,自己心中都没有数,该完整地看看基础的API了. 见过的: assert:编写程序的单元测试用例 buffer:直接处理2进制数据 child_proce ...
- android延时弹出软键盘
searchEditView.setFocusable(true); searchEditView.setFocusableInTouchMode(true); searchEditView.requ ...
- IIS日志存入数据库之一:ODBC
园内@Fish Li的文章<IIS日志-网站运维的好帮手>中介绍将IIS的文本格式的文件导入数据库的方法.在实践中,我们发现导数据的速度很慢,一个200M的日志文件居然要近100分钟.我们 ...
- Windwos下Tomcat的安装与配置
一.准备工作 1. JDK环境,可参考https://www.cnblogs.com/eagle6688/p/7873477.html 2. Eclipse 3. Tomcat安装包和源码包 二.下载 ...
- SignalR2结合ujtopo实现拓扑图动态变化
上一篇文章基于jTopo的拓扑图设计工具库ujtopo,介绍了拓扑设计工具,这一篇我们使用SignalR2结合ujtopo实现拓扑图的动态变化. 仅仅作为演示,之前的文章SignalR2简易数据看板演 ...
- 《react精髓》读书笔记
概述 前几天找react的技术书籍看,找到<react精粹>和<深入浅出React和Redux>.由于<react精粹>是外国人写的,再加上译者奇舞团我也比较喜欢, ...
- 套接字:Socket
在进行通信之前,一般要先建立Socket连接,Socket编程是端到端的通信,往往意识不到中间经过了多少局域网,多少路由器,他能操作的是端到端协议之上的网络层和传输层. 在网络层,Socket函数可以 ...
- mybatis四大接口之 Executor
[参考文章]:Mybatis-Executor解析 1. Executor的继承结构 2. Executor(顶层接口) 定义了执行器的一些基本操作: public interface Executo ...