創(chuàng)建Maven Web項目
在Spring Tool Suite中創(chuàng)建Maven項目,生成web.xml文件
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
</web-app>
</figure>
web.xml是整個項目的核心配置文件,也可以理解為Web程序訪問的入口,非常重要
在servlet3.0及后續(xù)版本中,此配置文件可省略,采用注解方式替代,本課程暫不涉及。
在項目的pom.xml文件中增加依賴關系:<label data-toggle="modal" data-target="#myModal" style="cursor: pointer; color: rgb(206, 72, 68);">點擊詳細</label>
集成Spring框架
Spring框架是整個系統(tǒng)架構的核心,將前端請求數(shù)據(jù)的處理以及數(shù)據(jù)庫的數(shù)據(jù)操作整合在一起,非常重要。
在web.xml文件中增加配置信息集成Spring框架
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<web-app>
...
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/spring-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
...
</web-app>
</figure>
Spring環(huán)境構建時需要讀取web應用的初始化參數(shù)contextConfigLocation, 從classpath中讀取配置文件spring/spring-*.xml
在項目src/main/resources目錄中增加spring文件夾,并在其中增加spring-context.xml配置文件。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
</beans>
</figure>
Spring框架的核心是構建對象,整合對象之間的關系(IOC)及擴展對象功能(AOP),所以需要在spring-context.xml配置文件中增加業(yè)務對象掃描的相關配置。掃描后由Spring框架進行管理和組合。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<context:component-scan base-package="com.atguigu.*" >
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
...
</beans>
</figure>
掃描配置中為什么要排除Controller注解
Controller注解的的作用是聲明控制器(處理器)類。
從數(shù)據(jù)流轉(zhuǎn)的角度,這個類應該是由SpringMVC框架進行管理和組織的,所以不需要由Spring框架掃描。
集成SpringMVC框架
SpringMVC框架用于處理系統(tǒng)中數(shù)據(jù)的流轉(zhuǎn)及控制操作。
(從哪里來,到哪里去。多么有哲理的一句話。)
集成SpringMVC框架,需要在web.xml文件中增加配置信息
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<web-app>
...
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/springmvc-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
...
</web-app>
</figure>
SpringMVC環(huán)境構建時需要讀取servlet初始化參數(shù)init-param, 從classpath中讀取配置文件spring/springmvc-context.xml
在項目src/main/resources/spring目錄中,增加springmvc-context.xml配置文件。
<figure>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
</beans>
</figure>
SpringMVC框架的核心是處理數(shù)據(jù)的流轉(zhuǎn),所以需要在springmvc-context.xml配置文件中增加控制器對象(Controller)掃描的相關配置。掃描后由SpringMVC框架進行管理和組合。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<context:component-scan base-package="com.atguigu.*" use-default-filters="false" >
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
...
</beans>
</figure>
靜態(tài)資源如何不被SpringMVC框架進行攔截
在配置文件中增加<mvc:default-servlet-handler/>, <mvc:annotation-driven />即可
在實際的項目中靜態(tài)資源不會和動態(tài)資源放在一起,也就意味著不會放置在服務器中,所以這些配置可以省略。
如果SpringMVC框架數(shù)據(jù)處理為頁面跳轉(zhuǎn),那么需要配置相應的視圖解析器ViewResolver。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
...
</beans>
</figure>
如果有多個視圖解析器怎么辦?
SpringMVC框架中允許存在多個視圖解析器,框架會按照配置聲明順序,依次進行解析。
SpringMVC框架中配置多個視圖解析器時,如果將InternalResourceViewResolver解析器配置在前,那么即使找不到視圖,框架也不會繼續(xù)解析,直接發(fā)生404錯誤,所以必須將InternalResourceViewResolver解析器放置在最后。
如果SpringMVC框架數(shù)據(jù)處理為響應JSON字符串,那么為了瀏覽器方便對響應的字符串進行處理,需要明確字符串的類型及編碼方式。
如果增加了<mvc:annotation-driven />標簽,下面的配置可省略。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" >
<property name="messageConverters" >
<list>
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" >
<property name="supportedMediaTypes" >
<list>
<value>application/json;charset=UTF-8</value>
</list>
</property>
</bean>
</list>
</property>
</bean>
...
</beans>
</figure>
如果項目中含有文件上傳業(yè)務,還需要增加文件上傳解析器MultipartResolver
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" p:defaultEncoding="UTF-8" >
<property name="maxUploadSize" value="2097152"/>
<property name="resolveLazily" value="true"/>
</bean>
...
</beans>
</figure>
集成Mybatis框架
Mybatis框架主要處理業(yè)務和數(shù)據(jù)庫之間的數(shù)據(jù)交互,所以創(chuàng)建對象和管理對象生命周期的職責可以委托Spring框架完成。如:創(chuàng)建Mybatis核心對象。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" >
<property name="configLocation" value="classpath:mybatis/config.xml" />
<property name="dataSource" ref="dataSource" />
<property name="mapperLocations" >
<list>
<value>classpath*:mybatis/mapper-*.xml</value>
</list>
</property>
</bean>
...
<bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer" >
<property name="basePackage" value="com.atguigu.atcrowdfunding.**.dao" />
</bean>
...
</beans>
</figure>
既然需要和數(shù)據(jù)庫進行關聯(lián),那么Mybatis核心對象就需要依賴于數(shù)據(jù)庫連接池(C3P0),所以在Spring配置文件中增加相應的配置。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" >
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/atcrowdfunding?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf8"/>
<property name="user" value="root"/>
<property name="password" value="root"/>
</bean>
...
</beans>
</figure>
集成Mybatis框架時同時還需要增加核心配置文件mybatis/config.xml。
<figure>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
...
</typeAliases>
</configuration>
</figure>
及SQL映射文件mybatis/mapper-*.xml。
<figure>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="xxx.XXDao" >
...
</mapper>
</figure>
為了保證數(shù)據(jù)操作的一致性,必須在程序中增加事務處理。Spring框架采用聲明式事務,通過AOP的方式將事務增加到業(yè)務中。所以需要在Spring配置文件中增加相關配置
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<beans>
...
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" >
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:advice id="transactionAdvice" transaction-manager="transactionManager" >
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" isolation="DEFAULT" rollback-for="java.lang.Exception" />
<tx:method name="query*" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:advisor advice-ref="transactionAdvice" pointcut="execution(* com.atguigu..*Service.*(..))"/>
</aop:config>
...
</beans>
</figure>
測試前,需要在數(shù)據(jù)庫中增加atcrowdfunding庫及t_user表。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<pre style="background: rgb(0, 0, 0); color: rgb(255, 255, 255);">CREATE DATABASE atcrowdfunding;
...
CREATE TABLE t_user (
id int(11) NOT NULL AUTO_INCREMENT
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
</pre>
</figure>
框架集成測試
框架集成完畢后,需要增加代碼程序進行簡單的測試。
增加代碼前請參考[《阿里巴巴Java開發(fā)手冊》](javascript:;)
在src/main/java/com/atguigu/atcrowdfunding/controller目錄中增加UserController
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.controller;
import java.util.HashMap;
import java.util.Map;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/user")
public class UserController {
@RequestMapping("/index")
public String index() {
return "user/index";
}
@ResponseBody
@RequestMapping("/json")
public Object json() {
Map map = new HashMap();
map.put("username", "張三");
return map;
}
}
</figure>
將web項目發(fā)布到服務器中,啟動服務器,瀏覽器中分別輸入路徑http://127.0.0.1:8080/應用路徑名稱/user/index,http://127.0.0.1:8080/應用路徑名稱/user/json進行測試。
如果訪問成功,說明項目中SpringMVC框架集成成功。
在src/main/java/com/atguigu/atcrowdfunding/service目錄中增加UserService接口。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.service;
public interface UserService {
}
</figure>
在src/main/java/com/atguigu/atcrowdfunding/service/impl目錄中增加UserServiceImpl實現(xiàn)類。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.service.impl;
import com.atguigu.atcrowdfunding.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserDao userDao;
}
</figure>
在src/main/java/com/atguigu/atcrowdfunding/dao目錄中增加UserDao接口。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.dao;
public interface UserDao {
}
</figure>
修改UserController類,增加對UserService接口的引用。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.controller;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@RequestMapping("/index")
public String index() {
return "user/index";
}
@ResponseBody
@RequestMapping("/json")
public Object json() {
Map map = new HashMap();
map.put("username", "張三");
return map;
}
}
</figure>
重啟服務器,重新通過瀏覽器中訪問路徑http://127.0.0.1:8080/應用路徑名稱/user/index進行測試。
如果訪問成功,說明項目中Spring框架(IOC功能)集成成功。
在src/main/java/com/atguigu/corwdfunding/bean目錄中增加User實體類。
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.bean;
public class User {
}
</figure>
在UserService接口中增加方法聲明queryById,并在UserServiceImpl類中默認實現(xiàn)
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.service;
import com.atguigu.atcrowdfunding.bean.User;
public interface UserService {
public User queryById();
}
</figure>
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.service.impl;
import com.atguigu.atcrowdfunding.bean.User;
import com.atguigu.atcrowdfunding.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserDao userDao;
public User queryById() {
return userDao.queryById();
}
}
</figure>
如果訪問成功,說明項目中Spring框架(AOP功能)集成成功。
在UserDao中增加查詢語句,實現(xiàn)數(shù)據(jù)庫查詢
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
package com.atguigu.atcrowdfunding.dao;
import com.atguigu.atcrowdfunding.bean.User;
import org.apache.ibatis.annotations.Select;
public interface UserDao {
@Select("select * from t_user where id = 1")
public User queryById();
}
</figure>
如果訪問成功,說明項目中Mybatis框架集成成功。
模擬生產(chǎn)環(huán)境
Web軟件開發(fā)中,由于開發(fā)階段不同,系統(tǒng)環(huán)境主要分為:開發(fā)環(huán)境,測試環(huán)境,生產(chǎn)環(huán)境。
將系統(tǒng)部署到生產(chǎn)環(huán)境后,經(jīng)常會聽開發(fā)人員這么說:這個Bug不應該呀,我們在測試時沒問題呀,怎么到了生產(chǎn)環(huán)境就不行了呢!!!
其實之所以會出現(xiàn)這種情況,很大程度上是因為我們在項目的不同階段時,對應用系統(tǒng)的訪問方式不一樣所造成的。
一般在開發(fā),測試階段時,我們都會以本地服務器地址http://localhost:8080/project訪問系統(tǒng),但是在生產(chǎn)環(huán)境中,我們的訪問方式發(fā)生了變化:http://com.xxxxx/,由于環(huán)境的不同,導致訪問方式的變化,那么就會產(chǎn)生很多之前沒有的問題。
如果能將開發(fā),測試,生產(chǎn)環(huán)境的訪問方式保持一致的話,那么就可以提前發(fā)現(xiàn)客戶在使用時所發(fā)生的問題,將這些問題提前解決,還是非常不錯的。
將
Tomcat服務器的默認HTTP監(jiān)聽端口號:8080修改為80將項目中
.settings目錄下的配置文件org.eclipse.wst.common.component中的context-root屬性修改為/(斜杠)修改系統(tǒng)主機文件
c:\Windows\System32\drivers\etc\hosts增加IP地址和域名的解析關系:127.0.0.1 www.atcrowdfunding.com
頁面導航
創(chuàng)建Maven Web項目 集成Spring框架 集成SpringMVC框架 集成Mybatis框架 框架集成測試 模擬生產(chǎn)環(huán)境
<footer class="bs-docs-footer" style="padding-top: 50px; padding-bottom: 50px; margin-top: 100px; color: rgb(153, 151, 156); background-color: rgb(42, 39, 48); text-align: left; font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">
本課件受開源協(xié)議保護,文檔受 CC BY 3.0 開源協(xié)議保護。
</footer>
×Close
項目依賴類庫
<figure class="highlight" style="padding: 0px; margin-bottom: 14px; background-color: rgb(247, 247, 249); border: 0px solid rgb(225, 225, 232); border-radius: 4px;">
<pre style="height: 400px;"><dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1.3-b06</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.2</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.8</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.8</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.19</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.19</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>5.15.1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>5.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-explorer</artifactId>
<version>5.15.1</version>
<exclusions>
<exclusion>
<artifactId>groovy-all</artifactId>
<groupId>org.codehaus.groovy</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies> </pre>
</figure>