In the previous article, we introduced the construction of the Dubbo distributed platform-maven build Ant-config project, the framework uses MAVEN to build, according to our plan, to build all the sub-projects, today is focused on the Ant-framework trusted project construction process.
Ant-framework is the foundation core framework of the ant distributed Framework, which includes a series of base classes and templates such as CRUD,MVC. In addition, the Spring,mybatis,wink framework extension projects are defined, including:
Annotation related annotations: Data signature annotations, whether users go SSO login annotations, etc.;
Related authentication of beans;
Filter Filters: Paging, SSO Single sign-on, etc.;
Object conversion encapsulation, such as: JSON;
The encapsulation of base controller, DAO, service, Basebean, XML;
The encapsulation of security rights;
The encapsulation of the base crud;
The encapsulation of the underlying servlet;
- Generic managed packages, such as: Users, roles, permissions, data dictionaries, menus, days, departmental bodies, and more.
Tip: Only a small subset of the cores are currently listed, and in a later chapter, all of the involved content one by one will be explained with the relevant code attached.
The previous article I wrote a little bit, some scholars may be unacceptable, in the following chapters, I will be specific to each knowledge point for detailed analysis, I hope you can follow the example to build up the framework.
Today we only do simple project creation, create the Ant-framework project, and inherit the Ant-parent project, where the Pom.xml configuration file is as follows:
<?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</versi on> </parent> <artifactId>ant-framework</artifactId> <NAME>ANT-FRAMEWORK</NAME&G T <url>http://maven.apache.org</url> <description> This project defines the code framework for ant, including a series of base classes and templates such as CRUD,MVC. It also defines the Spring,mybatis,wink framework extensions </description> <dependencies> <!--Spring Begin-and- Lt;dependency> <groupId>org.springframework</groupId> <artifactid>spring-core </artifactId> <version>${spring.version}</version> <exclusions> <exclusion> <groupid>c Ommons-logging</groupid> <artifactId>commons-logging</artifactId> &L t;/exclusion> </exclusions> </dependency> <dependency> <gr Oupid>org.springframework</groupid> <artifactId>spring-beans</artifactId> < ;version>${spring.version}</version> </dependency> <dependency> <group Id>org.springframework</groupid> <artifactId>spring-context</artifactId> < version>${spring.version}</version> </dependency> <dependency> <groupi D>org.springframework</groupid> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <GROUPID>ORG.SPRINGFR Amework</groupid> <artifactId>spring-aop</artifactId> <version>${spring.ve rsion}</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> <groupi D>org.springframework</groupid> <artifactId>spring-orm</artifactId> <versi on>${spring.version}</version> </dependency> <dependency> <groupid>org.springframework</ Groupid> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</ version> </dependency> <dependency> <groupid>org.springframework</grou Pid> <artifactId>spring-web</artifactId> <version>${spring.version}</versi on> </dependency> <dependency> <GROUPID>ORG.SPRINGFRAMEWORK</GROUPID&G T <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> &L t;/dependency> <dependency> <groupId>org.springframework</groupId> &L T;artifactid>spring-oxm</artifactid> <version>${spring.version}</version> </de pendency&Gt <!--Spring End--<!--Shiro Begin--<dependency> <groupid>org.apa Che.shiro</groupid> <artifactId>shiro-core</artifactId> <VERSION>${SHIRO.V ersion}</version> <exclusions> <exclusion> <GROUPID&G T;org.slf4j</groupid> <artifactId>slf4j-api</artifactId> </exclus ion> </exclusions> </dependency> <dependency> <groupId> Org.apache.shiro</groupid> <artifactId>shiro-spring</artifactId> <version> ${shiro.version}</version> </dependency> <dependency> <groupid>org.apa Che.shiro</groupid> <artifactId>shiro-web</artifactId> <version>${shiro.ve rsion}</version> </dependency> <dependency> <groupid>org.apache.shiro</groupid& Gt <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--<depende Ncy> <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---<!--framework tool JAR--<depe Ndency> <groupId>com.sml.sz</groupId> <artifactid>ant-utils</artifactid> ; <exclusions> <exclusion> <artifactid>slf4j-log4j12</artifactid> ; <groupId>org.slf4j</groupId> </exclusion> </exclusions> </d Ependency> </dependencies> </project>
The schema code is as follows:
(vii) SPRINGMVC distributed architecture-MAVEN Build ant-framework Framework file configuration