Donkey框架之一:概述
一:背景
J2EE框架越來越成熟,避不開的Spring體系,國內很多人都在用的dubbo,還有隨著Docker,K8S發展起來的微服務框架,容器框架。 在工作過程中,一直想著基於Spring體系封裝一個適合自己開發團
隊的框架,封裝一些成熟的元件,同時又暴露一些內容(避免過度封裝,導致開發人員只是會用,而無法瞭解其實現原理)。構建的過程中,不知不覺竟然成了一個毛坯版的Spring Boot,不能不感
慨Spring的與時俱進,急人之所急。
二:簡介
這個架構有Maven構建,暫時分為一下幾個模組,每個模組都獨立封裝成jar包,可在專案中引用
1.donkey-common-utils-support 工具類模組
2.donkey-common-dao-support 資料訪問類模組 類似於Spring-Data-Jpa
3.donkey-common-service-support 業務處理層模組
4.donkey-common-controller-support 控制層處理模組
5.donkey-common-cache-support 快取層處理模組
6.donkey-common-jms-support 訊息中介軟體層處理模組
7.donkey-common-session-support session集中處理模組
8.donkey-common-web-support web集中處理模組
9.donkey-common-security-web-support web安裝機制處理模組
10.donkey-mvc-api-demo 毛坯版的Spring boot 示例
11.donkey-spring-boot-web-demo 如何基於框架使用Spring boot 示例
三:框架的POM.xml檔案
J2EE框架越來越成熟,避不開的Spring體系,國內很多人都在用的dubbo,還有隨著Docker,K8S發展起來的微服務框架,容器框架。 在工作過程中,一直想著基於Spring體系封裝一個適合自己開發團
隊的框架,封裝一些成熟的元件,同時又暴露一些內容(避免過度封裝,導致開發人員只是會用,而無法瞭解其實現原理)。構建的過程中,不知不覺竟然成了一個毛坯版的Spring Boot,不能不感
慨Spring的與時俱進,急人之所急。
二:簡介
這個架構有Maven構建,暫時分為一下幾個模組,每個模組都獨立封裝成jar包,可在專案中引用
1.donkey-common-utils-support 工具類模組
2.donkey-common-dao-support 資料訪問類模組 類似於Spring-Data-Jpa
3.donkey-common-service-support 業務處理層模組
4.donkey-common-controller-support 控制層處理模組
5.donkey-common-cache-support 快取層處理模組
6.donkey-common-jms-support 訊息中介軟體層處理模組
7.donkey-common-session-support session集中處理模組
8.donkey-common-web-support web集中處理模組
9.donkey-common-security-web-support web安裝機制處理模組
10.donkey-mvc-api-demo 毛坯版的Spring boot 示例
11.donkey-spring-boot-web-demo 如何基於框架使用Spring boot 示例
三:框架的POM.xml檔案
點選(此處)摺疊或開啟
-
<?xml version="1.0" encoding="UTF-8"?>
-
<project xmlns="" xmlns:xsi=""
-
xsi:schemaLocation=" ">
-
<modelVersion>4.0.0</modelVersion>
-
-
<groupId>com.brilliantstar</groupId>
-
<artifactId>donkey</artifactId>
-
<version>0.0.1-SNAPSHOT</version>
-
<packaging>pom</packaging>
-
<name>donkey parent</name>
-
<description>The parent project of donkey</description>
-
-
<repositories>
-
<repository>
-
<id>nexus</id>
-
<name>BrilliantStar Nexus Repository</name>
-
<url>http://121.42.157.168:8081/nexus/content/groups/public</url>
-
</repository>
-
</repositories>
-
-
<!-- 模組 -->
-
<modules>
-
<module>donkey-common-utils-support</module>
-
<module>donkey-common-dao-support</module>
-
<module>donkey-common-service-support</module>
-
<module>donkey-common-controller-support</module>
-
<module>donkey-mvc-api-demo</module>
-
<module>donkey-common-cache-support</module>
-
<module>donkey-common-web-support</module>
-
<module>donkey-common-security-web-support</module>
-
<module>donkey-common-session-support</module>
-
<module>donkey-common-jms-support</module>
-
<module>donkey-spring-boot-web-demo</module>
-
</modules>
-
-
<!-- 屬性 -->
-
<properties>
-
<spring.version>4.3.9.RELEASE</spring.version>
-
<commons-lang3.version>3.6</commons-lang3.version>
-
<commons-lang.version>2.5</commons-lang.version>
-
<commons.io.version>2.5</commons.io.version>
-
<commons.logging.version>1.2</commons.logging.version>
-
<jackson.json.version>1.9.13</jackson.json.version>
-
<jackson.fasterxml.version>2.6.0</jackson.fasterxml.version>
-
<log4j2.version>2.7</log4j2.version>
-
<gson.version>2.2.4</gson.version>
-
<poi.version>3.9</poi.version>
-
<jsonlib.version>2.4</jsonlib.version>
-
<bouncycastle.version>140</bouncycastle.version>
-
<javax.persistence.version>1.0.2</javax.persistence.version>
-
<junit.version>4.10</junit.version>
-
<servlet.api.version>3.1.0</servlet.api.version>
-
<c3p0.version>0.9.1</c3p0.version>
-
<mysql.connector.version>5.1.36</mysql.connector.version>
-
-
<aspectj.version>1.8.10</aspectj.version>
-
<atomikos.version>4.0.4</atomikos.version>
-
<atomikos.transactions.jdbc.version>3.8.0</atomikos.transactions.jdbc.version>
-
<jta.version>1.1</jta.version>
-
<spring.data.redis.version>1.8.4.RELEASE</spring.data.redis.version>
-
<jedis.version>2.9.0</jedis.version>
-
<thymeleaf.version>3.0.6.RELEASE</thymeleaf.version>
-
<spring.session.redis.version>1.3.1.RELEASE</spring.session.redis.version>
-
<spring-security.version>4.2.3.RELEASE</spring-security.version>
-
<jsr250.version>1.0</jsr250.version>
-
<activemq.version>5.14.5</activemq.version>
-
<javax.jms.version>1.1-rev-1</javax.jms.version>
-
<slf4j.version>1.7.25</slf4j.version>
-
<springframework.boot.version>1.5.4.RELEASE</springframework.boot.version>
-
<tomcat.version>8.5.15</tomcat.version>
-
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
-
<spring-hateoas.version>0.23.0.RELEASE</spring-hateoas.version>
-
</properties>
-
-
<!-- 依賴配置 -->
-
<dependencyManagement>
-
<dependencies>
-
-
<dependency>
-
<groupId>org.springframework.hateoas</groupId>
-
<artifactId>spring-hateoas</artifactId>
-
<version>${spring-hateoas.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-thymeleaf</artifactId>
-
<version>${springframework.boot.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>nz.net.ultraq.thymeleaf</groupId>
-
<artifactId>thymeleaf-layout-dialect</artifactId>
-
<version>${thymeleaf-layout-dialect.version}</version>
-
</dependency>
-
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-web</artifactId>
-
<version>${springframework.boot.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-actuator</artifactId>
-
<version>${springframework.boot.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-websocket</artifactId>
-
<version>${springframework.boot.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-test</artifactId>
-
<version>${springframework.boot.version}</version>
-
<scope>test</scope>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-tomcat</artifactId>
-
<version>${springframework.boot.version}</version>
-
<scope>provided</scope>
-
</dependency>
-
-
-
<dependency>
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter-log4j2</artifactId>
-
<version>${springframework.boot.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.slf4j</groupId>
-
<artifactId>slf4j-api</artifactId>
-
<version>${slf4j.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>commons-logging</groupId>
-
<artifactId>commons-logging</artifactId>
-
<version>${commons.logging.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework</groupId>
-
<artifactId>spring-core</artifactId>
-
<version>${spring.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework</groupId>
-
<artifactId>spring-beans</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-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>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework</groupId>
-
<artifactId>spring-tx</artifactId>
-
<version>${spring.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.data</groupId>
-
<artifactId>spring-data-redis</artifactId>
-
<version>${spring.data.redis.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.session</groupId>
-
<artifactId>spring-session-data-redis</artifactId>
-
<version>${spring.session.redis.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.security</groupId>
-
<artifactId>spring-security-core</artifactId>
-
<version>${spring-security.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework.security</groupId>
-
<artifactId>spring-security-web</artifactId>
-
<version>${spring-security.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>org.springframework.security</groupId>
-
<artifactId>spring-security-config</artifactId>
-
<version>${spring-security.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>org.springframework.security</groupId>
-
<artifactId>spring-security-taglibs</artifactId>
-
<version>${spring-security.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.springframework</groupId>
-
<artifactId>spring-jms</artifactId>
-
<version>${spring.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.apache.activemq</groupId>
-
<artifactId>activemq-all</artifactId>
-
<version>${activemq.version}</version>
-
</dependency>
-
-
-
<dependency>
-
<groupId>javax.jms</groupId>
-
<artifactId>jms-api</artifactId>
-
<version>${javax.jms.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>javax.annotation</groupId>
-
<artifactId>jsr250-api</artifactId>
-
<version>${jsr250.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.apache.logging.log4j</groupId>
-
<artifactId>log4j-api</artifactId>
-
<version>${log4j2.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>org.apache.logging.log4j</groupId>
-
<artifactId>log4j-core</artifactId>
-
<version>${log4j2.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.apache.logging.log4j</groupId>
-
<artifactId>log4j-slf4j-impl</artifactId>
-
<version>${log4j2.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.apache.logging.log4j</groupId>
-
<artifactId>log4j-web</artifactId>
-
<version>${log4j2.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>com.google.code.gson</groupId>
-
<artifactId>gson</artifactId>
-
<version>${gson.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.apache.commons</groupId>
-
<artifactId>commons-lang3</artifactId>
-
<version>${commons-lang3.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>commons-io</groupId>
-
<artifactId>commons-io</artifactId>
-
<version>${commons.io.version}</version>
-
</dependency>
-
-
-
<dependency>
-
<groupId>com.fasterxml.jackson.core</groupId>
-
<artifactId>jackson-core</artifactId>
-
<version>${jackson.fasterxml.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>com.fasterxml.jackson.core</groupId>
-
<artifactId>jackson-databind</artifactId>
-
<version>${jackson.fasterxml.version}</version>
-
</dependency>
-
-
-
<dependency>
-
<groupId>com.fasterxml.jackson.core</groupId>
-
<artifactId>jackson-annotations</artifactId>
-
<version>${jackson.fasterxml.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.apache.poi</groupId>
-
<artifactId>poi</artifactId>
-
<version>${poi.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>net.sf.json-lib</groupId>
-
<artifactId>json-lib</artifactId>
-
<version>${jsonlib.version}</version>
-
<classifier>jdk15</classifier>
-
<exclusions>
-
<exclusion>
-
<artifactId>commons-logging</artifactId>
-
<groupId>commons-logging</groupId>
-
</exclusion>
-
</exclusions>
-
</dependency>
-
-
<dependency>
-
<groupId>bouncycastle</groupId>
-
<artifactId>bcprov-jdk15</artifactId>
-
<version>${bouncycastle.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>javax.persistence</groupId>
-
<artifactId>persistence-api</artifactId>
-
<version>${javax.persistence.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>javax.servlet</groupId>
-
<artifactId>javax.servlet-api</artifactId>
-
<version>${servlet.api.version}</version>
-
<scope>provided</scope>
-
</dependency>
-
-
<dependency>
-
<groupId>c3p0</groupId>
-
<artifactId>c3p0</artifactId>
-
<version>${c3p0.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>mysql</groupId>
-
<artifactId>mysql-connector-java</artifactId>
-
<version>${mysql.connector.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.aspectj</groupId>
-
<artifactId>aspectjrt</artifactId>
-
<version>${aspectj.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.aspectj</groupId>
-
<artifactId>aspectjweaver</artifactId>
-
<version>${aspectj.version}</version>
-
</dependency>
-
-
-
<dependency>
-
<groupId>com.atomikos</groupId>
-
<artifactId>transactions</artifactId>
-
<version>${atomikos.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>com.atomikos</groupId>
-
<artifactId>transactions-api</artifactId>
-
<version>${atomikos.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>com.atomikos</groupId>
-
<artifactId>atomikos-util</artifactId>
-
<version>${atomikos.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>com.atomikos</groupId>
-
<artifactId>transactions-jdbc-deprecated</artifactId>
-
<version>${atomikos.transactions.jdbc.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>com.atomikos</groupId>
-
<artifactId>transactions-jta</artifactId>
-
<version>${atomikos.version}</version>
-
</dependency>
-
<dependency>
-
<groupId>com.atomikos</groupId>
-
<artifactId>transactions-jdbc</artifactId>
-
<version>${atomikos.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>javax.transaction</groupId>
-
<artifactId>jta</artifactId>
-
<version>${jta.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>redis.clients</groupId>
-
<artifactId>jedis</artifactId>
-
<version>${jedis.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>org.thymeleaf</groupId>
-
<artifactId>thymeleaf-spring4</artifactId>
-
<version>${thymeleaf.version}</version>
-
</dependency>
-
-
<dependency>
-
<groupId>junit</groupId>
-
<artifactId>junit</artifactId>
-
<version>${junit.version}</version>
-
<scope>test</scope>
-
</dependency>
-
</dependencies>
-
</dependencyManagement>
-
-
<!-- 外掛配置 -->
-
<build>
-
<pluginManagement>
-
<plugins>
-
<plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-compiler-plugin</artifactId>
-
<configuration>
-
<source>1.8</source>
-
<target>1.8</target>
-
<compilerArguments>
-
<extdirs>${java.home}/lib</extdirs>
-
<bootclasspath>${java.home}/jre/lib/rt.jar;${java.home}/jre/lib/jce.jar</bootclasspath>
-
</compilerArguments>
-
</configuration>
-
</plugin>
-
-
<plugin>
-
<groupId>org.apache.maven.plugins</groupId>
-
<artifactId>maven-resources-plugin</artifactId>
-
<configuration>
-
<encoding>UTF-8</encoding>
-
</configuration>
-
</plugin>
-
</plugins>
-
</pluginManagement>
-
</build>
- </project>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28624388/viewspace-2141907/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Donkey框架之二:工具類模組框架
- BizTalk框架概述框架
- Docker教程之一概述和作用Docker
- AWS系列之一 亞馬遜雲服務概述亞馬遜
- 集合框架體系概述框架
- 【翻譯】集合框架概述框架
- Java中 集合框架概述Java框架
- 奈學:Executor框架的概述框架
- 圖片下載框架概述框架
- 前端框架擼起來——概述前端框架
- 集合框架-Map集合功能概述框架
- AngularJS教程七—— 框架概述AngularJS框架
- DirectShow系列講座之一——DirectShow系統概述 (轉)
- Pytorch框架詳解之一PyTorch框架
- Spring5的框架概述Spring框架
- 「Spring認證」Spring 框架概述Spring框架
- [轉載] 快速學習-Mybatis框架概述MyBatis框架
- 集合框架-LinkedHashMap的概述和使用框架HashMap
- 集合框架-LinkedHashSet的概述和使用框架
- Spring review--Spring框架概述SpringView框架
- 團隊開發框架Tdf.NET概述框架
- 集合框架-泛型類的概述及使用框架泛型
- 集合框架-泛型方法的概述和使用框架泛型
- 集合框架-泛型介面的概述和使用框架泛型
- SpringMVC 框架系列之元件概述與配置詳解SpringMVC框架元件
- SSM框架學習筆記_第1章_SpringIOC概述SSM框架筆記Spring
- DKhadoop大資料平臺基礎框架方案概述Hadoop大資料框架
- Web 金字塔式開發框架分層模型概述Web框架模型
- 自己動手寫Web自動化測試框架(1) :概述Web框架
- 如何編寫一個前端框架之一-專案結構(譯)前端框架
- 大資料框架之一——Hadoop學習第四天大資料框架Hadoop
- FFToast:GitHub中最強大的iOS Notification和AlertView框架,沒有之一!FFTASTGithubiOSView框架
- 概述
- mysql資料庫整體技術體系及框架概覽之一MySql資料庫框架
- 從提示工程到代理工程:構建高效AI代理的策略框架概述AI框架
- HarmonyOS Next 加解密演算法框架入門:基礎概念與功能概述解密演算法框架
- JVM 概述JVM
- Java 概述Java