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月份才能看到了,目前的例子都 ...
随机推荐
- Android SimpleAdapter ViewBinder
- 最大流Dinic算法
嘿嘿嘿,时隔不久又见到了DInic,再次回顾一下吧 不过这次我倒是不想深究,而是想多做一些题,因为这几次比赛下来,算法不是重点,重点是题目如何转化,算法如何应用,这也是比赛为什么让你带着板子的原因吧, ...
- kafka groupid
kafka 分组 简言之,就是相同分组的消费者,会分摊消费kafka中同一个topic中的数据.
- git命令行的操作实例教程
Git 常用命令常用命令 创建新仓库 创建新文件夹,打开,然后执行 git init 1 以创建新的 git 仓库. 检出仓库 执行如下命令以创建一个本地仓库的克隆版本: git clone /pat ...
- RxSwift学习笔记6:Subjects/PublishSubject/BehaviorSubject/ReplaySubject/Variable
// 从前面的几篇文章可以发现,当我们创建一个 Observable 的时候就要预先将要发出的数据都准备好,等到有人订阅它时再将数据通过 Event 发出去. // 但有时我们希望 Observabl ...
- Python自动化开发 - Django【基础篇】
Python的WEB框架有Django.Tornado.Flask 等多种,Django相较与其他WEB框架其优势为: 大而全,框架本身集成了ORM.模型绑定.模板引擎.缓存.Session等诸多功能 ...
- cvpr2015总结
cvpr所有文章 http://cs.stanford.edu/people/karpathy/cvpr2015papers/ CNN Hypercolumns for Object Segmenta ...
- linux下git远程仓库的搭建
一.服务器环境 ubuntukylin-16.04-server-amd64 二.远程服务器创建一个名字叫git的用户,专门用于管理git仓库. $ adduser git 三.安装git.服务器端和 ...
- .NET高级代码审计(第三课)Fastjson反序列化漏洞
0X00 前言 Java中的Fastjson曾经爆出了多个反序列化漏洞和Bypass版本,而在.Net领域也有一个Fastjson的库,作者官宣这是一个读写Json效率最高的的.Net 组件,使用内置 ...
- 使用EF6连接mariaDB出现中文查找不到数据的问题
1.问题描述 这两天使用ef6.0查询mariaDB出现了数据查询不到的情况 2.问题分析 后来发现除了这段数据查询不到,其他都能查询,于是逐步对比代码,发现其他数据都是英文的,而这句是中文的于是把条 ...