增加服务端配置文件与依赖包

This commit is contained in:
hanqi 2025-02-28 16:53:13 +08:00
parent 63cd5f6967
commit 1a66192ee8
8 changed files with 420 additions and 0 deletions

View File

@ -0,0 +1,2 @@
max.deep=2
param.ignore=@com.aisino.iles.core.annotation.CurrentUser

96
server/README.md Normal file
View File

@ -0,0 +1,96 @@
# 综合执法系统后端服务
基于Spring Boot 3.1构建的企业级执法管理系统后端,采用模块化架构设计。
## 模块架构
### 1. 核心模块 (core)
```
src/main/java/com/aisino/iles/core/
├── config/ # 全局配置
│ ├── WebConfig.java # Web MVC配置
│ └── RedisConfig.java # Redis缓存配置
├── controller/ # 核心控制器
│ ├── StreetInfoController.java # 街道信息管理
│ └── CacheAdminController.java # 缓存管理
├── service/ # 核心业务服务
│ ├── UserService.java # 用户服务
│ └── PermissionService.java # 权限管理
├── repository/ # 数据访问层
│ ├── UserRepo.java # 用户数据访问
│ └── StreetInfoRepo.java # 街道信息访问
├── model/ # 数据模型
│ ├── BaseModel.java # 基础实体
│ └── UserDTO.java # 用户传输对象
└── util/ # 核心工具
└── CacheUtils.java # 缓存工具类
```
### 2. 公共模块 (common)
```
src/main/java/com/aisino/iles/common/
├── util/ # 通用工具
│ ├── ExportExcelHelper.java # Excel导出
│ └── BufferedBlockingQueue.java # 缓冲队列
├── config/ # 公共配置
│ └── SwaggerConfig.java # API文档配置
├── service/ # 公共服务
│ ├── AwsS3Service.java # 文件存储服务
│ └── FtpService.java # 文件上传下载服务对awsS3Service进行封装
└── exception/ # 异常处理
└── GlobalExceptionHandler.java # 全局异常处理
```
### 3. 执法业务模块 (lawenforcement)
```
src/main/java/com/aisino/iles/lawenforcement/
├── service/ # 执法业务服务
│ ├── CaseService.java # 案件管理
│ └── EvidenceService.java # 证据管理
├── controller/ # 执法控制器
│ ├── CaseController.java # 案件API
│ └── EvidenceController.java # 证据API
└── model/ # 业务模型
├── CaseDTO.java # 案件传输对象
└── EvidenceVO.java # 证据展示对象
```
## 技术栈
- **核心框架**: Spring Boot 3.1.12
- **持久层**: Spring Data JPA + Hibernate 6.2
- **数据库**: MySQL 8.0 / 达梦 DM8
- **缓存**: Redis 7.0 + Redisson 3.23
- **文件存储**: AWS S3 + FTP
- **API文档**: Springdoc OpenAPI 3.0
## 环境配置
```yaml
# application-dev.yml
redisson:
config: classpath:application-redisson-cache.yml
spring:
datasource:
url: jdbc:h2:mem:testdb
driver-class-name: org.h2.Driver
# application-prod.yml
spring:
datasource:
url: jdbc:kingbase8://db:54321/iles_db
username: ${DB_USER}
password: ${DB_PWD}
```
## 依赖管理
```bash
mvn install:install-file -DgroupId=com.smartlx -DartifactId=sso-client -Dversion=1.0 -Dpackaging=jar -Dfile=./lib/sso-client-1.0.jar
mvn install:install-file -DgroupId=com.aisino.kingbase -DartifactId=KesDialect-for-hibernate6.2 -Dversion=2.0.0 -Dpackaging=jar -Dfile=./lib/KesDialect-for-hibernate6.2-2.0.0.jar
mvn install:install-file -DgroupId=com.aisino.sm4Interface -DartifactId=kms-sdk -Dversion=1.2 -Dpackaging=jar -Dfile=./lib/kms-sdk-1.2-SNAPSHOT.jar
```
## 构建运行
```bash
mvn clean package -DskipTests
java -jar target/iles-1.0.0.jar --spring.profiles.active=prod
```
## API文档
- apifox 在线文档

13
server/iles.iml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<setting name="provider-name" value="Hibernate" />
<datasource-mapping />
<naming-strategy-map />
</configuration>
</facet>
</component>
</module>

Binary file not shown.

Binary file not shown.

Binary file not shown.

308
server/pom.xml Normal file
View File

@ -0,0 +1,308 @@
<?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.aisino</groupId>
<artifactId>iles</artifactId>
<version>1.0.0</version>
<name>iles</name>
<description>Spring Boot 3 Web Application</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.12</version>
<relativePath/>
</parent>
<properties>
<java.version>17</java.version>
<redisson.version>3.23.4</redisson.version>
<hibernate.version>6.2.13.Final</hibernate.version>
</properties>
<dependencies>
<!-- Spring Boot Starters -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Hutool -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.11</version>
</dependency>
<!-- Validator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>${redisson.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-hibernate-6</artifactId>
<version>3.27.1</version>
</dependency>
<!-- ULID -->
<dependency>
<groupId>com.github.f4b6a3</groupId>
<artifactId>ulid-creator</artifactId>
<version>5.2.0</version>
</dependency>
<!-- lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.17.0</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.aisino.sm4Interface</groupId>
<artifactId>kms-sdk</artifactId>
<version>1.2</version>
<exclusions>
<exclusion>
<groupId>com.koal.thrift</groupId>
<artifactId>kthrift</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
<!-- Hibernate Cache -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate6</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.12.53</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.62</version>
</dependency>
<dependency>
<groupId>org.lionsoul</groupId>
<artifactId>ip2region</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>net.jpountz.lz4</groupId>
<artifactId>lz4</artifactId>
<version>1.3.0</version>
</dependency>
<!-- 统一认证-->
<dependency>
<groupId>com.smartlx</groupId>
<artifactId>sso-client</artifactId>
<version>1.0</version>
</dependency>
<!-- 海康威视-->
<dependency>
<groupId>com.hikvision.ga</groupId>
<artifactId>artemis-http-client</artifactId>
<version>1.1.3</version>
</dependency>
<!-- Apache PDFBox -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.27</version> <!-- 确保使用最新版本 -->
</dependency><!-- 如果需要额外的功能,如字体处理,可以添加以下依赖 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
<version>2.0.27</version> <!-- 确保版本与pdfbox一致 -->
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.57</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.18.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<properties>
<activatedProperties>dev</activatedProperties>
</properties>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>prod</id>
<dependencies>
<!-- kingbase-->
<dependency>
<groupId>cn.com.kingbase</groupId>
<artifactId>kingbase8</artifactId>
<version>8.6.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.aisino.kingbase</groupId>
<artifactId>KesDialect-for-hibernate6.2</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>

1
server/version.txt Normal file
View File

@ -0,0 +1 @@
v1.3.5