2017-07-22 90 views
-1

當創建Web應用程序時,我們使用maven來獲取所有jar。在這裏,當我試圖創建一個與春天版本4.3.7和春季安全4.2.2 Maven Web應用程序。我需要使用諸如休眠,log4j,apache瓷磚,itext,java郵件,apache poi,json-simple和一些用於web應用程序中的常見jar等常見文件上傳等其他jar。Spring Hibernate Maven Jar Version

我需要使用這個網頁應用程序在JBoss 7.1.1中有數據源支持和Java 1.7版本。我需要使用正確版本的jar。

請查收以下POM提前

<dependencies> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-context</artifactId> 
      <version>${org.springframework-version}</version> 
      <exclusions> 
       <!-- Exclude Commons Logging in favor of SLF4j --> 
       <exclusion> 
        <groupId>commons-logging</groupId> 
        <artifactId>commons-logging</artifactId> 
       </exclusion> 
      </exclusions> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-context-support</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-webmvc</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-web</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-tx</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-orm</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-oxm</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.springframework</groupId> 
      <artifactId>spring-jdbc</artifactId> 
      <version>${org.springframework-version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-web</artifactId> 
      <version>${springsecurity.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-config</artifactId> 
      <version>${springsecurity.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.springframework.security</groupId> 
      <artifactId>spring-security-taglibs</artifactId> 
      <version>${springsecurity.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-core</artifactId> 
      <version>${hibernate-core-version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.hibernate.common</groupId> 
      <artifactId>hibernate-commons-annotations</artifactId> 
      <version>4.0.5.Final</version> 
     </dependency> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-validator</artifactId> 
      <version>4.3.1.Final</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-core</artifactId> 
      <version>${apachetiles.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-api</artifactId> 
      <version>${apachetiles.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-servlet</artifactId> 
      <version>${apachetiles.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.tiles</groupId> 
      <artifactId>tiles-jsp</artifactId> 
      <version>${apachetiles.version}</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.commons</groupId> 
      <artifactId>commons-dbcp2</artifactId> 
      <version>2.1.1</version> 
     </dependency> 

     <dependency> 
      <groupId>com.googlecode.json-simple</groupId> 
      <artifactId>json-simple</artifactId> 
      <version>1.1.1</version> 
     </dependency> 

     <dependency> 
      <groupId>commons-fileupload</groupId> 
      <artifactId>commons-fileupload</artifactId> 
      <version>1.3.2</version> 
     </dependency> 

     <dependency> 
      <groupId>org.apache.poi</groupId> 
      <artifactId>poi</artifactId> 
      <version>3.15</version> 
     </dependency> 

     <dependency> 
      <groupId>com.lowagie</groupId> 
      <artifactId>itext</artifactId> 
      <version>4.2.1</version> 
     </dependency> 

     <dependency> 
      <groupId>org.aspectj</groupId> 
      <artifactId>aspectjrt</artifactId> 
      <version>${org.aspectj-version}</version> 
     </dependency> 

     <dependency> 
      <groupId>javax.inject</groupId> 
      <artifactId>javax.inject</artifactId> 
      <version>1</version> 
     </dependency> 

     <dependency> 
      <groupId>javax.mail</groupId> 
      <artifactId>javax.mail-api</artifactId> 
      <version>1.5.5</version> 
     </dependency> 
     <dependency> 
      <groupId>javax.mail</groupId> 
      <artifactId>mail</artifactId> 
      <version>1.4.7</version> 
     </dependency> 

     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>javax.servlet-api</artifactId> 
      <version>3.0.1</version> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet.jsp</groupId> 
      <artifactId>javax.servlet.jsp-api</artifactId> 
      <version>2.3.1</version> 
     </dependency> 
     <dependency> 
      <groupId>javax.servlet</groupId> 
      <artifactId>jstl</artifactId> 
      <version>1.2</version> 
     </dependency> 

     <dependency> 
      <groupId>javax.transaction</groupId> 
      <artifactId>jta</artifactId> 
      <version>1.1</version> 
     </dependency> 

     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>3.8.1</version> 
      <scope>test</scope> 
     </dependency> 
    </dependencies> 
    <build> 
     <finalName>WebApp</finalName> 
    </build> 

    <properties> 
     <org.springframework-version>4.3.7.RELEASE</org.springframework-version> 
     <springsecurity.version>4.2.2.RELEASE</springsecurity.version> 
     <apachetiles.version>3.0.7</apachetiles.version> 
     <hibernate-core-version>4.3.11.Final</hibernate-core-version> 
     <org.aspectj-version>1.8.10</org.aspectj-version> 
     <org.slf4j-version>1.7.5</org.slf4j-version> 
     <log4j.version>1.2.17</log4j.version> 
    </properties> 

</project> 

感謝。 (從生產環境中經驗豐富的專業期待的答案。)

回答

0

,如果你想使用JBoss 7.1.1你需要的,如果你是使用上述JDK和春天的版本,它會發生錯誤就jdk1.7Spring 3.1.2運行這個項目。所以。如果你想運行最新版本的spring和jdk,你需要使用最新版本的Jboss。

+0

在jboss 7.1.1.'上,彈簧'4.3'與java'7'看到了什麼問題? spring'4'的最低要求是java'6 +'和servlet'2.5'。 –

相關問題