博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SSH开发环境整合搭建
阅读量:6971 次
发布时间:2019-06-27

本文共 2480 字,大约阅读时间需要 8 分钟。

1.建立动态web工程,加入必要的jar包。

antlr-2.7.7.jarasm-3.3.jarasm-commons-3.3.jarasm-tree-3.3.jarc3p0-0.9.1.2.jarcom.springsource.net.sf.cglib-2.2.0.jarcom.springsource.org.aopalliance-1.0.0.jarcom.springsource.org.aspectj.weaver-1.6.8.RELEASE.jarcommons-fileupload-1.2.2.jarcommons-io-2.0.1.jarcommons-lang3-3.1.jarcommons-logging-1.1.1.jardom4j-1.6.1.jarfreemarker-2.3.19.jarhibernate-commons-annotations-4.0.2.Final.jarhibernate-core-4.2.4.Final.jarhibernate-jpa-2.0-api-1.0.1.Final.jarjavassist-3.11.0.GA.jarjavassist-3.15.0-GA.jarjboss-logging-3.1.0.GA.jarjboss-transaction-api_1.1_spec-1.0.1.Final.jarmchange-commons-java-0.2.10.jarmysql-connector-java-5.1.26-bin.jarognl-3.0.5.jarspring-aop-4.0.0.RELEASE.jarspring-aspects-4.0.0.RELEASE.jarspring-beans-4.0.0.RELEASE.jarspring-context-4.0.0.RELEASE.jarspring-core-4.0.0.RELEASE.jarspring-expression-4.0.0.RELEASE.jarspring-jdbc-4.0.0.RELEASE.jarspring-orm-4.0.0.RELEASE.jarspring-tx-4.0.0.RELEASE.jarspring-web-4.0.0.RELEASE.jar //此包为spring整合到web的关键jar包struts2-core-2.3.4.jarstruts2-spring-plugin-2.3.4.jarxwork-core-2.3.4.jar

2. web.xml的配置

contextConfigLocation
classpath:applicationcontext.xml
org.springframework.web.context.ContextLoaderListener
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
struts2
/*

3. spring整合hibernate及struts2的配置文件

  图解如下:

  

applicationcontext.xml

       
    
     
 

db.properties 数据库连接的信息

user=rootpassword=123driver=com.mysql.jdbc.Driverurl=jdbc:mysql:///sshinitialPoolSize=5maxPoolSize=10

hibernate.cfg.xml

org.hibernate.dialect.MySQL5InnoDBDialect
true
true
update

struts.xml

/emp-list

这样基本的开发环境就搭建好了

转载于:https://www.cnblogs.com/hfblogs/p/5253818.html

你可能感兴趣的文章
Linux命令行下常用的快捷键
查看>>
table 中 文字长度大于td宽度,导致文字换行 解决方案
查看>>
[KEY] DK NOTES
查看>>
NeHe OpenGL教程 第四十三课:FreeType库
查看>>
学位论文“致谢”中的人称问题
查看>>
php加速缓存器opcache,apc,xcache,eAccelerator
查看>>
JavaScript面向对象
查看>>
按“块”的方式写dom以及代码注释
查看>>
Winform实现多线程异步更新UI(进度及状态信息)
查看>>
类的初始化列表和声明列表初始化的顺序
查看>>
BZOJ 2004: [Hnoi2010]Bus 公交线路 [DP 状压 矩阵乘法]
查看>>
浅谈流形学习(转)
查看>>
浏览器兼容问题 及 解决方案 (一)
查看>>
FLP不可能原理
查看>>
数据库哪些情况下适合建索引,哪些情况下不适合建索引
查看>>
【转】MEF程序设计指南二:Silverlight中使用CompositionInitializer宿主MEF
查看>>
Win10系列:VC++ Direct3D模板介绍3
查看>>
python 执行sql得到字典格式数据
查看>>
编程语言混合开发初探
查看>>
STM32 usb_mem.c和usb_sil.c文件的分析
查看>>