porm.xml-ssh[通俗易懂]

porm.xml-ssh[通俗易懂]基于Maven的ssh2整合,Struts2.3.24+Spring4.2.4+Hibernate5.0.7完整文件<projectxmlns=”http://maven.apache.org/POM/4.0.0″xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”xsi:schemaLocatio…

大家好,又见面了,我是你们的朋友全栈君。

 

基于Maven的ssh2整合,Struts2.3.24+Spring4.2.4+Hibernate5.0.7

 

完整文件

porm.xml-ssh[通俗易懂]
porm.xml-ssh[通俗易懂]

<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.0</modelVersion>
  <groupId>com.hao.test</groupId>
  <artifactId>MavenSSH</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>

  <!-- 属性 -->
  <properties>
    <spring.version>4.2.4.RELEASE</spring.version>
    <hibernate.version>5.0.7.Final</hibernate.version>
    <struts.version>2.3.24</struts.version>
  </properties>

  <!-- 锁定版本,struts2-2.3.24、spring4.2.4、hibernate5.0.7 -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-core</artifactId>
        <version>${struts.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-spring-plugin</artifactId>
        <version>${struts.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    
    <!-- 单元测试 -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
    </dependency>
    
    <!-- web3.0 -->
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>javax.servlet.jsp-api</artifactId>
      <version>2.2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    
    <!-- spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aspects</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    
    <!-- hibernate -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>

    <!-- struts2 -->
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-spring-plugin</artifactId>
    </dependency>

    <!-- 数据库驱动 -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.6</version>
      <scope>runtime</scope>
    </dependency>
    
    <!-- c3p0 -->
    <dependency>
      <groupId>c3p0</groupId>
      <artifactId>c3p0</artifactId>
      <version>0.9.1.2</version>
    </dependency>

    <!-- 日志 -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.2</version>
    </dependency>
    
  </dependencies>

  <build>
    <plugins>
      <!-- 配置JDK版本 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <!-- Maven的Tomcat插件 -->
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <!-- 可额外配置路径、端口等信息,要求使用tomcat7:run运行 -->
          <port>8888</port>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

View Code

 

为了方便复制,下面为不包含头部和项目描述的易拷贝版本:

porm.xml-ssh[通俗易懂]
porm.xml-ssh[通俗易懂]

  <!-- 属性 -->
  <properties>
    <spring.version>4.2.4.RELEASE</spring.version>
    <hibernate.version>5.0.7.Final</hibernate.version>
    <struts.version>2.3.24</struts.version>
  </properties>

  <!-- 锁定版本,struts2-2.3.24、spring4.2.4、hibernate5.0.7 -->
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-core</artifactId>
        <version>${struts.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-spring-plugin</artifactId>
        <version>${struts.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    
    <!-- 单元测试 -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
    </dependency>
    
    <!-- web3.0 -->
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>javax.servlet.jsp-api</artifactId>
      <version>2.2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    
    <!-- spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aspects</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    
    <!-- hibernate -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>

    <!-- struts2 -->
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.struts</groupId>
      <artifactId>struts2-spring-plugin</artifactId>
    </dependency>

    <!-- 数据库驱动 -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.6</version>
      <scope>runtime</scope>
    </dependency>
    
    <!-- c3p0 -->
    <dependency>
      <groupId>c3p0</groupId>
      <artifactId>c3p0</artifactId>
      <version>0.9.1.2</version>
    </dependency>

    <!-- 日志 -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.2</version>
    </dependency>
    
  </dependencies>

  <build>
    <plugins>
      <!-- 配置JDK版本 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.5.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <!-- Maven的Tomcat插件 -->
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <!-- 可额外配置路径、端口等信息,要求使用tomcat7:run运行 -->
          <port>8888</port>
        </configuration>
      </plugin>
    </plugins>
  </build>

View Code

 

转载于:https://www.cnblogs.com/tommychok/p/7340671.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/147832.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • java获取当前时间的时间戳_linux修改文件时间戳

    java获取当前时间的时间戳_linux修改文件时间戳一、需求项目中使用java8的LocalDateTime进行日期参数的接收,前后台使用unix时间戳进行日期传输,需要在controller的方法中实现自动将unix时间戳转换为LocalDateTime。localhost:8080?time=1512900770publicvoidtest(@RequestParamLocalDateTimetime){System.out.prin…

    2022年10月2日
    3
  • 光棍节程序员闯关秀第9关(总共10关) 解题步骤

    光棍节程序员闯关秀第9关(总共10关) 解题步骤题目链接:http://segmentfault.com/game/?k=4999c12ce5be7c3cba227ba9f4f7d797解题步骤:1.应景嘛,把所有的空格替换成11112.8位二进制转换成一个byte,解释为ASCII字符3.得到一个BASE64加密在字符串4.用 BASE64Decoder解密5.另存为

    2022年7月16日
    18
  • anaconda虚拟环境安装tensorflow_开源ocr哪个好

    anaconda虚拟环境安装tensorflow_开源ocr哪个好由于我需要使用爬虫进行练习,用的是windows10,所以安装过程很是艰辛。报错1:用python的pip安装tesserocr,发生如下代码错误:经过查询tesserocr安装环境要求,需要leptonica-1.71版本以上文件;确认代码中错误,确实发现安装过程中leptonica文件无法找到。解决方法:用Anaconda安装python环境。使用Anacond…

    2022年8月29日
    2
  • 计算机3级数据库技术考哪些内容,计算机考试三级数据库技术考试大纲[通俗易懂]

    计算机3级数据库技术考哪些内容,计算机考试三级数据库技术考试大纲[通俗易懂]全国计算机等级考试采用全国统一命题,统一考试的形式。所有科目每年开考两次。下面是小编整理的计算机考试三级数据库技术考试大纲,欢迎大家参考!基本要求1.掌握数据库技术的基本概念、原理、方法和技术。2.能够使用SQL语言实现数据库操作。3.具备数据库系统安装、配置及数据库管理与维护的基本技能。4.掌握数据库管理与维护的`基本方法。5.掌握数据库性能优化的基本方法。6.了解数据库应用系统的生命周期及其设…

    2022年6月21日
    30
  • 摄影后期人像高端摄影后期PS修图技巧[通俗易懂]

    摄影后期人像高端摄影后期PS修图技巧[通俗易懂]先自我介绍一下,叶子,职业修图师,从事数码后期行业12余载,擅长人像后期处理,婚纱照商业化修图,热爱摄影,喜欢旅行,总是用照片讲述故事。本文会从什么是**『皮肤质感』**,要修成这样的效果需要什么前置条件以及在过程中我们需要注意哪些核心要点为基准详细展开,意在让大家彻底明白怎样才能做出商业修图的皮肤效果。全文3504字,阅读时间约9分钟,如果觉得不愿意全看的话,可以直接拉到最后看结论。不…

    2022年6月15日
    36
  • TCP三次握手和四次挥手详解(面试常见问题)

    TCP三次握手和四次挥手详解(面试常见问题)  大概两个月前,一位朋友在面试360集团时,在面试过程中被问及TCP三次握手和四次挥手的相关知识,他当时只知道大概,但当时面试官问他TCP三次握手过程中发送的数字是多少,他一下子就懵住了,因为这也是他第一次参加面试,准备的并不充分,也根本没想到会问到具体发送的数字,结果显而易见,最后被刷了。由此可见,TCP三次握手和四次挥手在面试中是面试官非常喜欢的问题,所以掌握这个知识是十分重要的。  T…

    2022年6月16日
    27

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号