使用maven管理jar包的依赖

< project  xmlns = “ http://maven.apache.org/POM/4.0.0 ”  xmlns :xsi = “ http://www.w3.org/2001/XMLSchema-instance ”  xsi :schemaLocation = “ http:/ /maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd “ >
< modelVersion > 4.0. </ modelVersion >
< groupId > com.dabai </ groupId >
< artifactId > test-parent </ artifactId >
< version > 0.0.-SNAPSHOT </ version >
< 包装 > pom </ packaging >
< name > parent </ name >
< description >父</ description > < properties >
< spring .version> 4.2..RELEASE </ spring .version>
< hibernate .version> 5.0..Final </ hibernate .version>
< struts2 .version> 2.3. </ struts2 .version>
< slf4j .version> 1.6. </ slf4j .version>
< log4j .version> 1.2. </ log4j .version>
< shiro .version> 1.2. </ shiro .version>
</ properties > < dependencies >
< 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-context </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-context-support </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-web </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-orm </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-beans </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.springframework </ groupId >
< artifactId > spring-core </ artifactId >
< version > $ {spring.version} </ version >
</ dependency > < 依赖 >
< groupId > org.aspectj </ groupId >
< artifactId > aspectjweaver </ artifactId >
< version > 1.7. </ version >
</ dependency > <! - struts2开始- >
< 依赖 >
< groupId > org.apache.struts </ groupId >
< artifactId > struts2-core </ artifactId >
< version > $ {struts2.version} </ version >
<! -排除传递的依赖- >
< exclusions >
< 排除 >
< artifactId > javassist </ artifactId >
< groupId > javassist </ groupId >
</ exclusion >
</ exclusions >
</ dependency >
< 依赖 >
< groupId > org.apache.struts </ groupId >
< artifactId > struts2-spring-plugin </ artifactId >
< version > $ {struts2.version} </ version >
</ dependency >
< 依赖 >
< groupId > org.apache.struts </ groupId >
< artifactId > struts2-convention-plugin </ artifactId >
< version > $ {struts2.version} </ version >
</ dependency >
<! - struts2 end - > <! - hibernate begin - >
< 依赖 >
< groupId > org.hibernate </ groupId >
< artifactId > hibernate-core </ artifactId >
< version > $ {hibernate.version} </ version >
</ dependency >
<! - hibernate end - > <! - log start - >
< 依赖 >
< groupId > log4j </ groupId >
< artifactId > log4j </ artifactId >
< version > $ {log4j.version} </ version >
</ dependency > < 依赖 >
< groupId > org.slf4j </ groupId >
< artifactId > slf4j-api </ artifactId >
< version > $ {slf4j.version} </ version >
</ dependency > < 依赖 >
< groupId > org.slf4j </ groupId >
< artifactId > slf4j-log4j12 </ artifactId >
< version > $ {slf4j.version} </ version >
</ dependency >
<! - log end - > < 依赖 >
< groupId > org.apache.poi </ groupId >
< artifactId > poi </ artifactId >
< version > 3.11 </ version >
</ dependency > < 依赖 >
< groupId > org.apache.cxf </ groupId >
< artifactId > cxf-rt-frontend-jaxws </ artifactId >
< version > 3.0. </ version >
</ dependency >
< 依赖 >
< groupId > org.apache.cxf </ groupId >
< artifactId > cxf-rt-transports-http </ artifactId >
< version > 3.0. </ version >
</ dependency >
< 依赖 >
< groupId > junit </ groupId >
< artifactId > junit </ artifactId >
< version > 4.10 </ version >
< scope > test </ scope >
</ dependency > <! -加入的servlet和JSP的依赖- >
< 依赖 >
< groupId > javax.servlet </ groupId >
< artifactId > servlet-api </ artifactId >
< version > 2.5 </ version >
< scope >提供</ scope >
</ dependency >
< 依赖 >
< groupId > javax.servlet </ groupId >
< artifactId > jsp-api </ artifactId >
< version > 2.0 </ version >
< scope >提供</ scope >
</ dependency > <! -引入pinyin4J的依赖- >
< 依赖 >
< groupId > com.belerweb </ groupId >
< artifactId > pinyin4j </ artifactId >
< version > 2.5. </ version >
</ dependency > <! -引入JSON-lib中的依赖- >
< 依赖 >
< groupId > net.sf.json-lib </ groupId >
< artifactId > json-lib </ artifactId >
< version > 2.4 </ version >
</ dependency > <! -引入c3p0jar包- >
< 依赖 >
< groupId > c3p0 </ groupId >
< artifactId > c3p0 </ artifactId >
< version > 0.9.1.2 </ version >
</ dependency > <! -引入了Ehcache的依赖- >
< 依赖 >
< groupId > net.sf.ehcache </ groupId >
< artifactId > ehcache-core </ artifactId >
< version > 2.6. </ version >
</ dependency >
<! -引入四郎框架的依赖- >
< 依赖 >
< groupId > org.apache.shiro </ groupId >
< artifactId > shiro-all </ artifactId >
< version > 1.2. </ version >
</ dependency >
<! -引入MySQL的数据库驱动依赖- >
< 依赖 >
< groupId > mysql </ groupId >
< artifactId > mysql-connector-java </ artifactId >
< version > 5.1. </ version >
</ dependency >
</ dependencies >
< build >
<! -插件- >
< plugins >
< 插件 >
< groupId > org.apache.maven.plugins </ groupId >
< artifactId > maven-resources-plugin </ artifactId >
< version > 2.5 </ version >
</ plugin >
< 插件 >
< groupId > org.apache.maven.plugins </ groupId >
< artifactId > maven-compiler-plugin </ artifactId >
< version > 2.3. </ version >
< 配置 >
< source > 1.7 </ source >
< target > 1.7 </ target >
</ configuration >
</ plugin >
<! -引入Tomcat的插件- >
< 插件 >
< groupId > org.apache.tomcat.maven </ groupId >
< artifactId > tomcat7-maven-plugin </ artifactId >
< version > 2.2 </ version >
< 配置 >
< path > / bos </ path >
< port > </ port >
</ configuration >
</ plugin >
</ plugins >
< resources >
< 资源 >
< directory > src / main / java </ directory >
< includes >
< include > ** / *。properties </ include >
< include > ** / *。xml </ include >
</ includes >
< filtering > false </ filtering >
</ resource >
< 资源 >
< directory > src / main / resources </ directory >
< includes >
< include > ** / *。properties </ include >
< include > ** / *。xml </ include >
</ includes >
< filtering > false </ filtering >
</ resource >
</ resources >
</ build > < modules >
< module > test-entity </ module >
< module > test-web </ module >
< module > test-utils </ module >
< module > test-service </ module >
< module > test-dao </ module >
</ modules >
</ project

实体和实体对应的hibernate映射文件

dao层:从上往下是baseDao一个抽取类 ,dao层接口类  dao层实现类

全部代码:https://github.com/Danovercast/study.git

最下面那个是webservice服务调用  是另外一个

基于struts2、hibernate、spring、shiro、MySQL的项目开发的更多相关文章

  1. 基于Struts2+Hibernate的朋友圈留言网站开发的质量属性

    在课堂上我们了解了质量高于功能,质量属性是指影响质量的相关因素,是对质量的描述.现在我们对基于SSH的交友网站开发的质量属性可以从以下几个方向进行分析: (1)可用性: 当错误发生时,使用可用性战术进 ...

  2. Struts2+Hibernate+Spring 整合示例

    转自:https://blog.csdn.net/tkd03072010/article/details/7468769 Struts2+Hibernate+Spring 整合示例 Spring整合S ...

  3. struts2+hibernate+spring简单整合且java.sql.SQLException: No suitable driver 问题解决

    最近上j2ee的课,老师要求整合struts2+hibernate+spring,我自己其实早早地有准备弄的,现在都第9个项目了,无奈自己的思路和头绪把自己带坑了,当然也是经验问题,其实只是用myec ...

  4. 工作笔记3.手把手教你搭建SSH(struts2+hibernate+spring)环境

    上文中我们介绍<工作笔记2.软件开发经常使用工具> 从今天開始本文将教大家怎样进行开发?本文以搭建SSH(struts2+hibernate+spring)框架为例,共分为3步: 1)3个 ...

  5. 利用Intellij+MAVEN搭建Spring+Mybatis+MySql+SpringMVC项目详解

    http://blog.csdn.net/noaman_wgs/article/details/53893948 利用Intellij+MAVEN搭建Spring+Mybatis+MySql+Spri ...

  6. Hibernate入门2.简单的项目开发实例

    Hibernate入门2.简单的项目开发实例 这一节通过一个简单的项目学习Hibernate项目的配置 代码下载 : 链接: http://pan.baidu.com/s/1zlgjl 密码: p34 ...

  7. 【Hades】ades是一个开源库,基于JPA和Spring构建,通过减少开发工作量显著的改进了数据访问层的实现

    几乎每个应用系统都需要通过访问数据来完成工作.要想使用领域设计方法,你就需要为实体类定义和构建资源库来实现领域对象的持久化.目前开发人员经常使用JPA来实现持久化库.JPA让持久化变得非常容易,但是仍 ...

  8. 基于Vue、web3的以太坊项目开发及交易内幕初探 错误解决总结

    基于Vue.web3的以太坊项目开发及交易内幕初探 本文通过宏观和微观两个层面窥探以太坊底层执行逻辑. 宏观层面描述创建并运行一个小型带钱包的发币APP的过程,微观层面是顺藤摸瓜从http api深入 ...

  9. [置顶] struts2+hibernate+spring整合(annotation版)

    本博文使用struts2,hibernate,spring技术整合Web项目,同时分层封装代码,包含model层,DAO层,Service层,Action层. 在整合hibernate时使用annot ...

  10. springMVC用法 以及一个简单的基于springMVC hibernate spring的配置

    替代struts 1  web.xml中配置springmvc中央控制器 <?xml version="1.0" encoding="UTF-8"?> ...

随机推荐

  1. 【野草】SQL Server之索引解析(二)

    1.堆表 堆表通过IAM连接一起,查询时全表扫描. 1.1 非聚集索引 结构 叶子节点数据结构:行数据结构+Rid(8字节) 中间节点数据结构: (非聚集非唯一索引)行数据结构+Page(4)+2+ ...

  2. 利用sklearn对MNIST手写数据集开始一个简单的二分类判别器项目(在这个过程中学习关于模型性能的评价指标,如accuracy,precision,recall,混淆矩阵)

    .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px so ...

  3. 如何使用在三星840 SSD硬件加密下使用Bitlocker

    我的笔记本存放到比较重要的资料,需要加密,想到我的三星EVO 850 SSD支持三种加密模式,于是想使用全盘加密模式.但是找了半天没找到一点合适的中文资料,于是怒而翻译一下加密全盘加密的Bitlock ...

  4. c#基础,单线程,跨线程访问和线程带参数

    using System; using System.Collections.Generic; using System.Threading; using System.Windows.Forms; ...

  5. oracle账户登录数据库进行如下操作:

    CREATE USER NORTHBOUND IDENTIFIED BY NORTHBOUND DEFAULT TABLESPACE "TBS_DNINMSV31" TEMPORA ...

  6. Vue在ASP.NET MVC中的进行前后端的交互

    Vue在ASP.NET MVC中的进行前后端的交互 Preface: 由于最近在研究前端相关的技术,作为前端非常优秀的框架Vue,个人在学习的过程中遇到一些问题,网上相关资料有限,所以在这这里总结一下 ...

  7. .Net 控制台中文(简体/繁体)乱码问题

    加上这句就可以了: Console.OutputEncoding = System.Text.Encoding.UTF8; class Program { static void Main(strin ...

  8. 基于C#&.net2.0的windows服务创建与安装

    起因:一台服务器中部署的程序,停电后未按照计划任务正常启动. 一.创建并配置Windows服务程序 开发工具VS2015 Framework版本2.0 1.新建Windows服务 2.在Service ...

  9. [MySQL] 5.7版本以上group by语句报1055错误问题

    1. 在5.7版本以上mysql中使用group by语句进行分组时, 如果select的字段 , 不是完全对应的group by后面的字段 , 有其他字段 , 那么就会报这个错误 ERROR 105 ...

  10. [Linux] 搭建rsync服务端

    rsync是unix/linux下同步文件的一个高效算法,它能同步更新两处计算机的文件与目录,并适当利用查找文件中的不同块以减少数据传输. Linux守护进程的运行方式:1.独立运行(stand-al ...