zoukankan      html  css  js  c++  java
  • SpringMVC+FreeMarker+Mybatis 整合

    这个项目自己有时写写测试代码什么的, 代码比较简单,代码已放在 github : https://github.com/zhouyongtao/homeinns-web

    目录结构:

    image

    贴一下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 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.homeinns.web</groupId>
      <artifactId>homeinns-web</artifactId>
      <packaging>war</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>homeinns-web Maven Webapp</name>
      <url>http://maven.apache.org</url>
      <dependencies>
          <!--spring-->
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-context</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-context-support</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-webmvc</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-jdbc</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-orm</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-tx</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>spring-test</artifactId>
              <version>4.0.5.RELEASE</version>
          </dependency>
          <!--mysql-->
          <dependency>
              <groupId>mysql</groupId>
              <artifactId>mysql-connector-java</artifactId>
              <version>5.1.31</version>
          </dependency>
          <!--sqljdbc4-->
          <dependency>
              <groupId>com.microsoft.sqlserver</groupId>
              <artifactId>sqljdbc4</artifactId>
              <version>4.0</version>
          </dependency>
          <!--druid-->
          <dependency>
              <groupId>com.alibaba</groupId>
              <artifactId>druid</artifactId>
              <version>1.0.7</version>
          </dependency>
          <!--dbutils-->
          <dependency>
              <groupId>commons-dbutils</groupId>
              <artifactId>commons-dbutils</artifactId>
              <version>1.6</version>
          </dependency>
          <!--mybatis-->
          <dependency>
              <groupId>org.mybatis</groupId>
              <artifactId>mybatis</artifactId>
              <version>3.2.7</version>
          </dependency>
          <dependency>
              <groupId>org.mybatis</groupId>
              <artifactId>mybatis-spring</artifactId>
              <version>1.2.2</version>
          </dependency>
          <!--freemarker-->
          <dependency>
              <groupId>org.freemarker</groupId>
              <artifactId>freemarker</artifactId>
              <version>2.3.20</version>
          </dependency>
          <!--quartz-->
          <dependency>
              <groupId>org.quartz-scheduler</groupId>
              <artifactId>quartz</artifactId>
              <version>2.2.1</version>
          </dependency>
          <dependency>
              <groupId>org.quartz-scheduler</groupId>
              <artifactId>quartz-jobs</artifactId>
              <version>2.2.1</version>
          </dependency>
          <!--ehcache-->
          <dependency>
              <groupId>net.sf.ehcache</groupId>
              <artifactId>ehcache</artifactId>
              <version>2.8.3</version>
          </dependency>
          <dependency>
              <groupId>org.mybatis</groupId>
              <artifactId>mybatis-ehcache</artifactId>
              <version>1.0.0</version>
          </dependency>
          <!--oscache
          <dependency>
              <groupId>opensymphony</groupId>
              <artifactId>oscache</artifactId>
              <version>2.4.1</version>
          </dependency>
          <dependency>
              <groupId>org.mybatis</groupId>
              <artifactId>mybatis-oscache</artifactId>
              <version>1.0.0</version>
          </dependency>
          -->
          <!-- scala-->
          <dependency>
              <groupId>org.scala-lang</groupId>
              <artifactId>scala-library</artifactId>
              <version>2.11.2</version>
          </dependency>
          <!-- netty-->
          <dependency>
              <groupId>io.netty</groupId>
              <artifactId>netty-all</artifactId>
              <version>4.0.23.Final</version>
          </dependency>
          <!--fastjson-->
          <dependency>
              <groupId>com.alibaba</groupId>
              <artifactId>fastjson</artifactId>
              <version>1.1.41</version>
          </dependency>
          <!--mapdb-->
          <dependency>
              <groupId>org.mapdb</groupId>
              <artifactId>mapdb</artifactId>
              <version>1.0.5</version>
          </dependency>
          <!--logback-->
          <dependency>
              <groupId>ch.qos.logback</groupId>
              <artifactId>logback-classic</artifactId>
              <version>1.1.2</version>
          </dependency>
          <dependency>
              <groupId>ch.qos.logback</groupId>
              <artifactId>logback-ext-spring</artifactId>
              <version>0.1.2</version>
          </dependency>
          <!--joda-time-->
          <dependency>
              <groupId>joda-time</groupId>
              <artifactId>joda-time</artifactId>
              <version>2.2</version>
          </dependency>
          <!--jsoup-->
          <dependency>
              <!-- jsoup HTML parser library @ http://jsoup.org/ -->
              <groupId>org.jsoup</groupId>
              <artifactId>jsoup</artifactId>
              <version>1.7.3</version>
          </dependency>
          <!--slf4j-->
          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
              <version>1.7.7</version>
          </dependency>
          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>jcl-over-slf4j</artifactId>
              <version>1.7.7</version>
          </dependency>
          <!--commons-->
          <dependency>
              <groupId>commons-logging</groupId>
              <artifactId>commons-logging</artifactId>
              <version>1.2</version>
          </dependency>
          <dependency>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
              <version>2.4</version>
          </dependency>
          <!--servlet-->
          <dependency>
              <groupId>javax.servlet</groupId>
              <artifactId>servlet-api</artifactId>
              <version>2.5</version>
              <scope>provided</scope>
          </dependency>
          <dependency>
              <groupId>javax.servlet</groupId>
              <artifactId>javax.servlet-api</artifactId>
              <version>3.1.0</version>
              <scope>provided</scope>
          </dependency>
          <dependency>
              <groupId>javax.servlet</groupId>
              <artifactId>jstl</artifactId>
              <version>1.2</version>
              <scope>provided</scope>
          </dependency>
          <dependency>
              <groupId>javax.servlet</groupId>
              <artifactId>jsp-api</artifactId>
              <version>2.0</version>
              <scope>provided</scope>
          </dependency>
          <!--junit-->
          <dependency>
              <groupId>junit</groupId>
              <artifactId>junit</artifactId>
              <version>4.11</version>
              <scope>test</scope>
          </dependency>
      </dependencies>
      <build>
        <finalName>homeinns-web</finalName>
      </build>
    </project>
  • 相关阅读:
    《移动Web前端高效开发实战》笔记4--打造单页应用SPA
    《移动Web前端高效开发实战》笔记3--代码检查任务
    《移动Web前端高效开发实战》笔记2——使用Gulp构建一个ECMAScript 6和Sass应用
    《移动Web前端高效开发实战》笔记1——静态布局在移动端上的自适应
    Node.js 历史
    《超实用的Node.js代码段》连载三:Node.js深受欢迎的六大原因
    《超实用的Node.js代码段》连载二:正确拼接Buffer
    《超实用的Node.js代码段》连载一:获取Buffer对象字节长度
    换个地方写博客
    【转一篇出处不明的文章】 Windows多线程通信方式
  • 原文地址:https://www.cnblogs.com/Irving/p/3916795.html
Copyright © 2011-2022 走看看