Struts218+Spring30+Hibernate332Word文件下载.docx
《Struts218+Spring30+Hibernate332Word文件下载.docx》由会员分享,可在线阅读,更多相关《Struts218+Spring30+Hibernate332Word文件下载.docx(10页珍藏版)》请在冰豆网上搜索。
jstl.jar
jta-1.1.jar
jtds-1.2.5.jar
junit-4.8.1.jar
log4j-1.2.8.jar
ognl-2.7.3.jar
org.springframework.aop-3.0.0.RELEASE.jar
org.springframework.asm-3.0.0.RELEASE.jar
org.springframework.aspects-3.0.0.RELEASE.jar
org.springframework.beans-3.0.0.RELEASE.jar
org.springframework.context-3.0.0.RELEASE.jar
org.springframework.context.support-3.0.0.RELEASE.jar
org.springframework.core-3.0.0.RELEASE.jar
org.springframework.expression-3.0.0.RELEASE.jar
org.springframework.instrument-3.0.0.RELEASE.jar
org.springframework.instrument.tomcat-3.0.0.RELEASE.jar
org.springframework.jdbc-3.0.0.RELEASE.jar
org.springframework.jms-3.0.0.RELEASE.jar
org.springframework.orm-3.0.0.RELEASE.jar
org.springframework.oxm-3.0.0.RELEASE.jar
org.springframework.test-3.0.0.RELEASE.jar
org.springframework.transaction-3.0.0.RELEASE.jar
org.springframework.web-3.0.0.RELEASE.jar
org.springframework.web.portlet-3.0.0.RELEASE.jar
org.springframework.web.servlet-3.0.0.RELEASE.jar
org.springframework.web.struts-3.0.0.RELEASE.jar
poi-3.5-FINAL-20090928.jar
proxool-0.9.1.jar
proxool-cglib.jar
pull-parser-2.1.10.jar
slf4j-api-1.5.10.jar
slf4j-log4j12-1.5.10.jar
slf4j-nop-1.5.10.jar
standard.jar
struts2-convention-plugin-2.1.8.1.jar
struts2-core-2.1.8.1.jar
struts2-dwr-plugin-2.1.8.1.jar
struts2-json-plugin-2.1.8.1.jar
struts2-spring-plugin-2.1.8.1.jar
velocity-1.5.jar
velocity-tools-1.3.jar
xwork-core-2.1.6.jar
proxool(proxool.properties)配置文件:
jdbc-0.proxool.alias=DBPool
jdbc-0.proxool.driver-url=jdbc:
jtds:
sqlserver:
//localhost:
1433/student
jdbc-0.proxool.driver-class=net.sourceforge.jtds.jdbc.Driver
jdbc-0.user=sa
jdbc-0.password=**********(哈哈,密码省略)
jdbc-0.proxool.house-keeping-sleep-time=40000
jdbc-0.proxool.house-keeping-test-sql=SELECTGETDATE()
jdbc-0.proxool.maximum-connection-count=100
jdbc-0.proxool.minimum-connection-count=25
jdbc-0.proxool.maximum-connection-lifetime=18000000
jdbc-0.proxool.simultaneous-build-throttle=5
jdbc-0.proxool.recently-started-threshold=40000
jdbc-0.proxool.overload-without-refusal-lifetime=50000
jdbc-0.proxool.maximum-active-time=60000
jdbc-0.proxool.verbose=true
jdbc-0.proxool.trace=true
jdbc-0.proxool.fatal-sql-exception=Fatalerror
jdbc-0.proxool.prototype-count=2
jdbc-0.proxool.statistics-log-level=ERROR
jdbc-0.proxool.test-before-use=true
jdbc-0.proxool.test-after-use=true
DWR(dwr.xml)配置文件:
<
?
xmlversion="
1.0"
encoding="
UTF-8"
>
!
DOCTYPEdwrPUBLIC"
-//GetAheadLimited//DTDDirectWebRemoting2.0//EN"
"
http:
//getahead.org/dwr/dwr20.dtd"
dwr>
allow>
createcreator="
spring"
javascript="
dwrTest"
paramname="
beanName"
value="
/>
--Spring配置文件中的bean:
aclManager-->
/create>
/allow>
/dwr>
项目配置文件(web.xml)配置文件:
web-appxmlns:
xsi="
//www.w3.org/2001/XMLSchema-instance"
xmlns="
xmlns:
web="
xsi:
schemaLocation="
"
id="
WebApp_ID"
version="
2.5"
display-name>
sshdwr<
/display-name>
welcome-file-list>
welcome-file>
index.html<
/welcome-file>
/welcome-file-list>
--页面不存在-->
error-page>
error-code>
404<
/error-code>
location>
/pagenotfound.html<
/location>
/error-page>
--错误页面-->
exception-type>
java.lang.Exception<
/exception-type>
/error.html<
--spring配置文件读取路径-->
context-param>
param-name>
contextConfigLocation<
/param-name>
param-value>
/WEB-INF/applicationContext.xml<
/param-value>
/context-param>
--增加spring监听(载入SpringApplicationContext)-->
listener>
listener-class>
org.springframework.web.context.ContextLoaderListener<
/listener-class>
/listener>
--扩展springbean的作用域有request,session,globalsession等-->
org.springframework.web.context.request.RequestContextListener<
--Spring刷新Introspector防止内存泄露-->
org.springframework.web.util.IntrospectorCleanupListener<
--spring的session管理-->
filter>
filter-name>
openSessionInViewFilter<
/filter-name>
filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter<
/filter-class>
init-param>
sessionFactoryBeanName<
sessionFactory<
/init-param>
singleSession<
true<
/filter>
filter-mapping>
url-pattern>
/*<
/url-pattern>
/filter-mapping>
--struts2.1.8配置-->
struts2<
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter<
--proxool的web监控-->
servlet>
servlet-name>
admin<
/servlet-name>
servlet-class>
org.logicalcobwebs.proxool.admin.servlet.AdminServlet<
/servlet-class>
/servlet>
servlet-mapping>
/admin<
/servlet-mapping>
--DWR配置-->
dwr<
uk.ltd.getahead.dwr.DWRServlet<
debug<
scriptCompressed<
false<
load-on-startup>
1<
/load-on-startup>
/dwr/*<
/web-app>
Spring(applicationContext.xml)配置文件:
beansxmlns="
//www.springframework.org/schema/beans"
jee="
//www.springframework.org/schema/jee"
tx="
//www.springframework.org/schema/tx"
context="
//www.springframework.org/schema/context"
//www.springframework.org/schema/beans
http:
//www.springframework.org/schema/beans/spring-beans-3.0.xsd
//www.springframework.org/schema/tx
//www.springframework.org/schema/tx/spring-tx-3.0.xsd
//www.springframework.org/schema/jee
//www.springframework.org/schema/jee/spring-jee-3.0.xsd
//www.springframework.org/schema/context
//www.springframework.org/schema/context/spring-context-3.0.xsd"
beanid="
propertyConfigurer"
class="
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
propertyname="
location"
/WEB-INF/hibConfig.properties"
/bean>
sessionFactory"
org.springframework.orm.hibernate3.LocalSessionFactoryBean"
mappingResources"
list>
value>
com/loverit/project/test/entity/Person.hbm.xml<
/value>
com/loverit/project/test/entity/Sex.hbm.xml<
/list>
/property>
hibernateProperties"
props>
propkey="
hibernate.dialect"
${hibernate.dialect}<
/prop>
hibernate.show_sql"
${hibernate.show_sql}<
hibernate.jdbc.batch_size"
${hibernate.jdbc.batch_size}<
hibernate.cache.use_query_cache"
${hibernate.cache.use_query_cache}<
hibernate.cache.provider_class"
${hibernate.cache.provider_class}<
--
hibernate.hbm2ddl.auto"
${hibernate.hbm2ddl.auto}<
-->
--proxool连接池-->
hibernate.connection.provider_class"
org.hibernate.connection.ProxoolConnectionProvider<
hibernate.proxool.properties"
proxool.properties<
hibernate.proxool.pool_alias"
DBPool<
/props>
--定义事务管理-->
transactionManager"
org.springframework.orm.hibernate3.HibernateTransactionManager"
ref="
--定义事务管理拦截器-->
transactionInterceptor"
org.springframework.transaction.interceptor.TransactionInterceptor"
transactionAttributes"
get*"
PROPAGATION_REQUIRED,readOnly<
*"
PROPAGATION_REQUIRED<
--定义代理自动管理事务-->
ProxyCreator"
org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"
--指定需要Spring管理事务的Bean-->
beanNames"
testService<
--调用事务管理拦截器-->
interceptorNames"
transactionInterceptor<
--测试类(本例未用到)-->
dao"
com.loverit.framework.dao.DaoImpl"
testService"
com.loverit.project.test.servi