基于spring-boot进行二次封装的structure-boot生态
structure是一个生态其中对一些常用组件进行封装。structure生态中的所有组件遵循拆箱即用原则,引用依赖后通过更改配置即可享用功能。目前最新版本为1.1.2.RELEASE
文档网站:https://www.structured.cn/
项目地址:https://github.com/structure-projects
主要功能
- structure-restful-web web组件
- structure-mybatis mybatis组件
- structure-mybatis-plus mybatis-plus组件、 mybatis-plus-generate代码生成组件
- structure-redis redis组件
- structure-redisson redisson组件
- structure-log log组件
- structure-jwt-security jwt-security组件
- structure-admin 是一个后端脚手架应用,structure-admin 集成了structure生态常用的组件及功能。
- structure-admin-ui 是一个前端脚手架应用也是structure-admin配套前端。
整体架构
structure生态一共分为依赖层、组件层、应用层、展示层共四层
- 依赖层:主要定义生态下的所有依赖及其版本信息
- 组件层:定义生态下的所有组件及组件所封装的功能
- 应用层:主要包括生态后端脚手架和实例项目生态演示
- 展示层:主要包括生态下对应的前端脚手架
快速创建一个structure-boot
pom 配置
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.structured</groupId>
<artifactId>structure-boot-example</artifactId>
<version>1.0.1</version>
<properties>
<structure.version>1.1.1.RELEASE</structure.version>
<spring-boot.version>2.1.2.RELEASE</spring.boot.version>
</properties>
<dependencies>
<dependency>
<groupId>cn.structured</groupId>
<artifactId>structure-restful-web-starter</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>${spring-boot.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>cn.structured</groupId>
<artifactId>structure-boot-parent</artifactId>
<version>${tructure.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
</project>
- 更改spring-boot 版本
<properties>
<spring.boot.version>2.1.4.RELEASE</spring.boot.version>
</properties>
- 修改structure版本
<properties>
<structure.version>1.1.1.RELEASE</structure.version>
</properties>