使用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服务调用  是另外一个

最新文章

  1. [MaxOSX] 路由操作
  2. 更改layout的布局
  3. Django+Nginx+MongoDB+Mysql+uWsgi的搭建
  4. sql给数据库加锁问题
  5. Exception in thread &quot;main&quot; java.lang.IllegalArgumentException:解决方法
  6. HDOJ-ACM1010(JAVA) 奇偶剪枝法 迷宫搜索
  7. Phpwind v9.0 存储型xss跨站漏洞
  8. 2015.01.06 JQuery
  9. 博客搬到CSDN了
  10. Java进阶(三十三)java基础-filter
  11. com.android.support:appcompat-v7:27.+问题解决
  12. 第十三节:Lambda、linq、SQL的相爱相杀(2)
  13. centos7下安装docker(15.4跨主机网络-flannel)
  14. JavaBasic_07
  15. 关于Eclipse如何加入Gradle文件与Android Studio两个平台一起开发,工作目录不发生变化
  16. 数据库日志文件——数据库“xxx”的事务日志已满,原因为“LOG_BACKUP”
  17. 使用ichartjs进行布局图表页面
  18. Jenkins git 的配置及问题解决
  19. _MainTex_TexelSize what&#39;s the meaning?
  20. The 14th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple - C 暴力 STL

热门文章

  1. VS2017安装过程中【工作负载】选择安装
  2. 基于C#程序设计语言的三种组合算法
  3. Powerdesigner逆向工程64位Oracle数据库
  4. [PHP] assert()断言检测函数
  5. [Go] 并发和并行的区别
  6. Java 内存模型 JMM 浅析
  7. Java 工厂模式(一)— 简单工厂模式
  8. Chrome下面查看placeholder的样式
  9. Vysor破解助手for Linux and macOS
  10. MongoDB 3.6版本关于bind_ip设置