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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.boolib.web</groupId>
<artifactId>web-ssm</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>web-ssm Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>4.3.6.RELEASE</spring.version>
</properties>
<!--
spring確實有自己的AOP。功能已經(jīng)基本夠用了,除非你的要在接口上動態(tài)代理或者方法攔截精確到getter和setter。
這些都是寫奇葩的需求,一般不使用。
1)如果使用xml方式,不需要任何額外的jar包。
2)如果使用@Aspect方式,你就可以在類上直接一個@Aspect就搞定,不用費事在xml里配了。
但是這需要額外的jar包( aspectjweaver.jar)。
因為spring直接使用AspectJ的注解功能,注意只是使用了它 的注解功能而已。并不是核心功能 !?。?
-->
<dependencies>
<!--測試框架Junit-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<!-- 指定范圍,在測試時才會加載 -->
<scope>test</scope>
</dependency>
<!--##########################數(shù)據(jù)庫依賴 start##############################-->
<!-- 添加mysql驅(qū)動依賴 -->
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<!--阿里巴巴druid連接池-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.29</version>
</dependency>
<!-- 添加mybatis依賴 -->
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.1</version>
</dependency>
<!-- 添加mybatis自動生成映射文件依賴 -->
<!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version>
</dependency>
<!-- 添加mybatis/spring整合包依賴 -->
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.0</version>
</dependency>
<!--##########################數(shù)據(jù)庫依賴 end##############################-->
<!--##########################spring依賴 start##############################-->
<!-- spring core 核心 -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<!--
包含Spring 框架基本的核心工具類。
Spring 其它組件要都要使用到這個包里的類,是其它組件的基本核心,當然你也可以在自己的應用系統(tǒng)中使用這些工具類。
外部依賴Commons Logging, (Log4J)。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<!--spring bean bean的管理 -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
<!--
所有應用都要用到的,它包含訪問配置文件、創(chuàng)建和管理bean
以及進行Inversion of Control / Dependency Injection(IoC/DI)操作相關(guān)的所有類。
如果應用只需基本的IoC/DI 支持,引入spring-core.jar 及spring-beans.jar 文件就可以了。
外部依賴spring-core,(CGLIB)。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring Aop -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-aop -->
<!--
這個jar 文件包含在應用中使用Spring 的AOP 特性時所需的類和源碼級元數(shù)據(jù)支持。
使用基于AOP 的Spring特性,如聲明型事務管理(Declarative Transaction Management),也要在應用里包含這個jar包。
外部依賴spring-core, (spring-beans,AOP Alliance, CGLIB,Commons Attributes)。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<!--spring context-->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<!--
這個jar文件為Spring核心提供了大量擴展??梢哉业绞褂肧pring ApplicationContext特性時所需的全部類,
JDNI所需的全部類,UI方面的用來與模板(Templating)引擎如Velocity、FreeMarker、JasperReports集成的類,
以及校驗Validation方面的相關(guān)類。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<!--spring context support -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context-support -->
<!--
包含支持UI模版(Velocity,F(xiàn)reeMarker,JasperReports),郵件服務,腳本服務(JRuby),緩存Cache(EHCache),
任務計劃Scheduling(uartz)方面的類。
外部依賴spring-context, (spring-jdbc, Velocity, FreeMarker, JasperReports, BSH, Groovy, JRuby, Quartz, EHCache)
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring web -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<!--
含Web 應用開發(fā)時,用到Spring 框架時所需的核心類,
包括自動載入Web ApplicationContext 特性的類、Struts 與JSF 集成類、文件上傳的支持類、Filter 類和大量工具輔助類。
外部依賴spring-context, Servlet API, (JSP API, JSTL, Commons FileUpload, COS)。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring mvc-->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<!--
這個jar文件包含Spring MVC框架相關(guān)的所有類。
包含國際化、標簽、Theme、視圖展現(xiàn)的FreeMarker、JasperReports、Tiles、Velocity、XSLT相關(guān)類。
當然,如果你的應用使用了獨立的MVC框架,則無需這個JAR文件里的任何類。
外部依賴spring-web, (spring-support,Tiles,iText,POI)。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring tx-->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-tx -->
<!--
以前是在這里org.springframework.transaction
為JDBC、Hibernate、JDO、JPA、Beans等提供的一致的聲明式和編程式事務管理支持。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring jdbc -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<!--
這個jar 文件包含對Spring 對JDBC 數(shù)據(jù)訪問進行封裝的所有類。
外部依賴spring-beans,spring-dao。
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring El表達式 -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-expression -->
<!--
Spring Expression Language —— 即Spring3中功能豐富強大的表達式語言,簡稱SpEL。
SpEL是類似于OGNL和JSF EL的表達式語言,能夠在運行時構(gòu)建復雜表達式,存取對象屬性、對象方法調(diào)用等。
所有的SpEL都支持XML和Annotation兩種方式,格式:#{ SpEL expression }
-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.version}</version>
</dependency>
<!--##########################spring依賴 end##############################-->
<!--##########################外部 AOP支持 start############################-->
<!--Aopalliance-->
<!-- https://mvnrepository.com/artifact/aopalliance/aopalliance -->
<!--
AOP Alliance(http://aopalliance.sourceforge.net/)是個聯(lián)合的開源協(xié)作組織,
在多個項目間進行協(xié)作以期提供一套標準的AOP Java接口(interface)。
Spring AOP就是基于AOP Alliance標準API實現(xiàn)的。
如果你打算使用Spring的AOP或基于AOP的任何特性,只需這個JAR文件。
-->
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
<!-- AspectJAop豐富。-->
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.9</version>
</dependency>
<!-- AOP注解-->
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<!--
如果使用@Aspect方式,你就可以在類上直接一個@Aspect就搞定,不用費事在xml里配了。
但是這需要額外的jar包( aspectjweaver.jar)。
因為spring直接使用AspectJ的注解功能,注意只是使用了它 的注解功能而已。并不是核心功能 ?。? -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.10</version>
</dependency>
<!--##########################外部 AOP支持 end############################-->
<!--##########################日志相關(guān)jar包 start############################-->
<!-- 添加日志相關(guān)jar包 -->
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!--##########################日志相關(guān)jar包 end############################-->
<!--##########################commons相關(guān)jar包 start########################-->
<!-- Io 提供依賴-->
<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<!--
處理IO的工具類包,對java.io進行擴展,提供了更加方便的IO操作。
-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<!--
提供統(tǒng)一的日志接口,同時兼顧輕量級和不依賴于具體的實現(xiàn)。
類包給中間件/日志工具開發(fā)者一個簡單的日志操作抽象,允許程序開發(fā)人員使用不同的具體日志實現(xiàn)工具。
為spring 提供依賴支持
-->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!--文件上傳 -->
<!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
<!--
為Web應用程序或Servlet提供文件上傳功能,Struts2和SpringMVC的文件上傳組件。
依賴包:Commons IO
-->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<!-- -->
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
<!--
Apache開源組織提供的用于摘要運算、編碼的包。在該包中主要分為四類加密:BinaryEncoders、DigestEncoders、LanguageEncoders、NetworkEncoders。
是編碼和解碼組件,提供常用的編碼和解碼方法,如DES、SHA1、MD5、Base64、URL和Soundx等。
-->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
</dependency>
<!--##########################Commons相關(guān)jar包 end########################-->
<!--##########################Json相關(guān)jar包 start########################-->
<!-- Jackson核心-->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<!--
提供jackson核心支持
-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.9</version>
</dependency>
<!-- Jackson注解-->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
<!--
Jackson數(shù)據(jù)綁定包使用的核心注釋,用于值類型。該包提供Json注解支持
-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.0</version>
</dependency>
<!--Jackson數(shù)據(jù)綁定->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<!--
對象序列化支持
-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.9</version>
</dependency>
<!--##########################Json相關(guān)jar包 end########################-->
<!--##########################JSTL相關(guān)jar包 start########################-->
<!-- JSP 標準標簽庫(JSTL)-->
<!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
<!--
JSP標準標簽庫(JSTL)是一個JSP標簽集合,它封裝了JSP應用的通用核心功能。
JSTL支持通用的、結(jié)構(gòu)化的任務,比如迭代,條件判斷,XML文檔操作,國際化標簽,SQL標簽。
除了這些,它還提供了一個框架來使用集成JSTL的自定義標簽。
根據(jù)JSTL標簽所提供的功能,可以將其分為5個類別。
核心標簽
格式化標簽
SQL 標簽
XML 標簽
JSTL 函數(shù)
-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/taglibs/standard -->
<!--提供JSTL和EL表達式支持
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
-->
<!--##########################JSTL相關(guān)jar包 end########################-->
</dependencies>
<build>
<finalName>web-ssm</finalName>
</build>
</project>