Maven + Spring4

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.xxxx</groupId>
  <artifactId>xxxx</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>xxxx</name>
  <url>http://maven.apache.org</url>
  <properties>
    <!-- database -->
    <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
    <jdbc.host>127.0.0.1</jdbc.host>
    <jdbc.port>3306</jdbc.port>
    <jdbc.databaseName>xxxx</jdbc.databaseName>
    <jdbc.username>root</jdbc.username>
    <jdbc.password>root</jdbc.password>
    <!-- version -->
    <spring.version>4.1.6.RELEASE</spring.version>
    <spring.security.version>4.0.1.RELEASE</spring.security.version>
    <java.version>1.8</java.version>
    <mysql.connector.verison>5.1.6</mysql.connector.verison>
    <tomcat.plugin.version>2.2</tomcat.plugin.version>
    <!-- Encoding -->
    <encoding>UTF8</encoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <!-- spring -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring.version}</version>
        <exclusions>
            <exclusion>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
          <groupId>org.springframework.security</groupId>
          <artifactId>spring-security-taglibs</artifactId>
          <version>${spring.security.version}</version>
    </dependency>
    <!-- 日志 -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>1.5.8</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.5.8</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.5.8</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.14</version>
    </dependency>

    <!-- JSP JSTL -->
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>javax.servlet.jsp-api</artifactId>
        <version>2.3.2-b01</version>
        <scope>provided</scope>
    </dependency>

    <!--     <dependency>
        <groupId>javax.servlet.jsp.jstl</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency> -->

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
         <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>taglibs</groupId>
        <artifactId>standard</artifactId>
        <version>1.1.2</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.5.3</version>
    </dependency>

    <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
        <version>2.5.3</version>
    </dependency>
    <!-- 数据库 -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql.connector.verison}</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
        <id>io.spring.repo.maven.release</id>
        <url>http://repo.spring.io/release/</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository>
    <repository>
        <id>mvnrepository</id>
        <url>http://mvnrepository.com/</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository>
    <repository>
        <id>mvnCenterRepository</id>
        <url>http://repo1.maven.org/maven2/</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository>
    <!-- <repository>
        <id>oschina</id>
        <url>http://maven.oschina.net/content/repositories/central/</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository> -->
  </repositories>
  <build>
    <finalName>smfs</finalName>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.properties</include>
            </includes>
            <filtering>true</filtering>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>**/*.properties</exclude>
            </excludes>
        </resource>
    </resources>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.7</version>
            <configuration>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.10</version>
            <configuration>
                <wtpversion>2.0</wtpversion>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
            </configuration>
        </plugin>
        <plugin>
              <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>${tomcat.plugin.version}</version>
            <configuration>
                <port>9090</port>
                <path>/xxxxx</path>
                <uriEncoding>UTF-8</uriEncoding>
                <finalName>xxxxx</finalName>
                <server>tomcat7</server>
            </configuration>
        </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <showWarnings>true</showWarnings>
            <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
时间: 2024-08-23 23:26:11

Maven + Spring4的相关文章

Maven Spring4.0

pom.xml   <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/maven-v4_0_0.xsd">    &

maven工程技术框架整合spring4+mybatis3等框架。

由于公司需要,现需组建一套新的框架技术整合开发.经再三衡量,最终选择使用的框架如下: springmvc4.2.2(web处理)+spring4.2.2(IOC+AOP)+mybatis3.2.8(与数据库的数据交互,持久层)+oscache2.4(缓存)+dubbo2.5.3(系统交互)+activityMq5.7.0(消息交互)+mysql5.6数据库+tomcat7服务+jdk1.7maven工程 + git(版本控制) + nexus(私服)+ zookeeper(服务注册中心(dubb

spring4.06 hibernate4.31 struts2.3.16 全注解MAVEN环境搭建

最近使用目录最新版本的SPRING.HIBERNATE.STRUTS使用MAVEN搭建了一个全注解的环境.记录一下 POM文件: <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 htt

最新SpringMVC+Spring4.1.1+hibernate4.3.5+maven 整合详细楝及说明

最新SpringMVC+Spring4.1.1+hibernate4.3.5+maven 整合详细配置 app主配置web.xml文件如下: <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/java

Spring4 MVC+Hibernate4 Many-to-many连接表+MySQL+Maven实例

这篇文章显示 Hibernate 的多对多实例,在 Spring MVC CRUD Web应用程序中连接表.我们将同时讨论管理多对多关系在视图和后端. 我们将使用应用程序的Web界面创建,更新,删除和查询. 本教程是利用 Spring 的 org.springframework.core.convert.converter.Converter 接口,它帮助我们在项目的数据库中实现实体的映射标识. 完整的示例的说明介绍如下. 使用以下技术: Spring 4.1.7.RELEASE Hiberna

idea+spring4+springmvc+mybatis+maven实现简单增删改查CRUD

在学习spring4+springmvc+mybatis的ssm框架,idea整合简单实现增删改查功能,在这里记录一下. 原文在这里:https://my.oschina.net/finchxu/blog/3007984 工作环境: Windows 10 jdk8(1.8) IntelliJ IDEA spring 4 和 springMVC MySQL 5.7 maven 3.3 mybatis 3.4 DBCP Tomcat 8.5 项目上传到了Github方便查看:https://gith

Spring4 mvc+maven 框架搭建(2)

在上一篇博客中,数据库数据和mybatis相关的java代码已经生成,接下来就可以使用IDE工具来搭建框架了. 在这里,我使用maven构建和管理代码,使用jdk1.8环境. 首先打开Eclipse,在右侧窗口右击new--->Other--->maven project--->next--->选中artifact id为maven-archetype-webapp然后next--->填写mvn三维坐标点击finsh 执行完上述步骤,一个web项目的基本框架便由maven搭建

eclipse搭建maven project的spring4 spring mvc mybatis

一,先确定已经安装好了Eclipse Java EE IDE for Web Developers我用的是如下版本 Version: Neon.3 Release (4.6.3)Build id: 20170314-1500 然后新增一个Maven project如下图,勾选上前2个复选框 二,填写groupid和artifactid等,最关键的是要选war类型的packaging,如下图: 三,然后修改如下3个地方的jdk配置为1.8并且把Project Facets中的Dynamic web

spring4.1.6配置quartz2.2.1(maven)

参考:http://blog.csdn.net/lk_blog/article/details/11744621 依赖: <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://