maven構建ant-framework框架的pom.xml文件配置
阿新 • • 發佈:2018-08-24
instance mon aop cor depend name 提醒 o-c mode ant-framework是ant分布式框架的基礎核心框架,其中包括CRUD,MVC等一系列基類和模板。另外定義了spring,mybatis,wink等底層框架擴展項目,具體內容包括:
其中ant-framework是ant分布式框架的基礎核心框架,其中包括CRUD,MVC等一系列基類和模板。另外定義了spring,mybatis,wink等底層框架擴展項目,具體內容包括:
-
annotation相關註解:數據簽名註解、用戶是否走sso登錄註解等;
-
Bean的相關認證;
-
filter過濾器:分頁、sso單點登錄等;
-
對象轉換封裝,如:json;
-
基礎controller、dao、service、basebean、xml的封裝;
-
security權限的封裝;
-
基礎CRUD的封裝;
-
基礎servlet的封裝;
- 通用管理的封裝,如:用戶、角色、權限、數據字典、菜單、日子、部門機構等。
提示:當前只列了其中的一小部分核心,在後面的章節中會將所有涉及的內容一一講解且附上相關代碼。
今天我們只做簡單的項目創建,創建ant-framework項目,並繼承ant-parent項目,其中pom.xml配置文件如下:
<?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.sml.sz</groupId> <artifactId>ant-project</artifactId> <version>1.0.0</version> </parent> <artifactId>ant-framework</artifactId> <name>ant-framework</name> <url>http://maven.apache.org</url> <description>此項目定義了ant的代碼框架,包括CRUD,MVC等一系列基類和模板。另外定義了spring,mybatis,wink等底層框架擴展</description> <dependencies> <!-- spring begin --> <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-beans</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</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-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</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-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</groupId> <artifactId>spring-oxm</artifactId> <version>${spring.version}</version> </dependency> <!-- spring end --> <!-- shiro begin --> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-core</artifactId> <version>${shiro.version}</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring</artifactId> <version>${shiro.version}</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-web</artifactId> <version>${shiro.version}</version> </dependency> <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-ehcache</artifactId> <version>${shiro.version}</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </exclusion> </exclusions> </dependency> <!-- shiro end --> <!-- mybatis begin --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${mybatis-spring.version}</version> </dependency> <!-- mybatis end --> <!-- hibernate validate begin --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>${validator.version}</version> </dependency> <!-- hibernate validate end --> <!-- 框架工具jar包 --> <dependency> <groupId>com.sml.sz</groupId> <artifactId>ant-utils</artifactId> <exclusions> <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> </dependencies> </project>
架構代碼如下:
更多資料歡迎球球2042849237
特別提醒:
由於ant-utils項目是整個分布式架構的通用工具jar包,故ant-utils項目在ant-framework的pom文件中進行配置,也就是說以後所有的項目都必須依賴ant-framework。
maven構建ant-framework框架的pom.xml文件配置