- 重用代码
- 统一规范
- 简化开发
- 降低维护难度
- 知识积累
eqs 特点
- 100% spring boot原味
- 开箱即用
pom.xml 配置
<?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>com.example</groupId>
<artifactId>myproject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!-- Inherit defaults from eqs -->
<parent>
<artifactId>eqs-parent</artifactId>
<groupId>com.icourt</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<packaging>war</packaging>
<!-- 添加eqs-core依赖 -->
<dependencies>
<dependency>
<groupId>com.icourt</groupId>
<artifactId>eqs-core</artifactId>
</dependency>
</dependencies>
<build>
<finalName>example</finalName>
<plugins>
<!-- 多环境打包插件【必须在spring boot插件前面】 -->
<plugin>
<groupId>com.juvenxu.portable-config-maven-plugin</groupId>
<artifactId>portable-config-maven-plugin</artifactId>
<version>1.1.60-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>replace-package</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- spring boot 打包插件 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<!-- icourt maven 仓库地址 -->
<repositories>
<repository>
<id>icourt-snapshot</id>
<url>http://nexus.alphalawyer.cn/repository/icourt-snapshots/</url>
</repository>
<repository>
<id>icourt-release</id>
<url>http://nexus.alphalawyer.cn/repository/icourt-release/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>icourt-maven-plugin-snapshot-repository</id>
<url>http://nexus.alphalawyer.cn/repository/icourt-snapshots/</url>
</pluginRepository>
<pluginRepository>
<id>icourt-maven-plugin-snapshot-release</id>
<url>http://nexus.alphalawyer.cn/repository/icourt-release/</url>
</pluginRepository>
</pluginRepositories>
</project>
其他和spring boot都是一致的,可以参考官方文档。
eqs 所有开发功能完全遵循spring boot的规范,都是条件式配置。eqs提供如下功能:
ApplicationAutoConfiguration
eqs的基本一些配置ApplicationDataSourceAutoConfiguration
多数据源自动配置ApplicationDaoAutoConfiguration
基于jdbcTemplate的通用daoApplicationRedisAutoConfiguration
redis配置ApplicationSwaggerAutoConfiguration
swagger配置ApplicationErrorAutoConfiguration
异常处理ApplicationQuartzAutoConfiguration
定时任务JwtAutoConfiguration
jwt相关@EnableJsonLogger
输出json格式日志
eqs的一些基本配置
XssConfiguration
xss过滤
CacheFilter
缓存拦截器,用于清空线程缓存
注册 FastJsonHttpMessageConverter4