You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
3.8 KiB
59 lines
3.8 KiB
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.5.3'
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
|
}
|
|
|
|
group = 'com.iflytop'
|
|
version = '0.0.1'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
springBoot {
|
|
buildInfo()
|
|
}
|
|
|
|
repositories {
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
maven { url 'https://maven.aliyun.com/repository/spring' }
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter'// Spring Boot 核心依赖,包含自动配置、日志、Spring Context 等基础功能
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'// 用于构建 REST API 的 Web 功能,包含 Spring MVC、Tomcat 等
|
|
implementation 'org.springframework.boot:spring-boot-starter-websocket:3.5.3' // WebSocket 支持
|
|
implementation 'org.springframework.statemachine:spring-statemachine-core:4.0.1'// Spring 状态机(有限状态机)核心包,用于处理状态转换逻辑
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation:3.5.3' // Bean 校验支持(如 @Valid、@NotNull 等注解)
|
|
implementation 'org.springframework.boot:spring-boot-starter-aop'// AOP(面向切面编程)支持,用于实现日志、权限校验等横切逻辑
|
|
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'// OpenAPI 文档生成器,用于生成 Swagger UI 接口文档
|
|
implementation 'org.freemarker:freemarker:2.3.34'// 模板引擎 FreeMarker,可用于生成动态内容(如生成文件或 Web 页面)
|
|
implementation 'org.xerial:sqlite-jdbc:3.50.3.0'// SQLite JDBC 驱动,提供对 SQLite 数据库的连接支持
|
|
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.5' // MyBatis Spring Boot 启动器,简化 MyBatis 配置
|
|
implementation 'com.baomidou:mybatis-plus-boot-starter:3.5.12'// MyBatis Plus 启动器,对 MyBatis 的增强支持(简化 CRUD、分页等)
|
|
implementation 'com.baomidou:mybatis-plus-generator:3.5.12'// MyBatis Plus 代码生成器,用于自动生成实体类、Mapper、Service 等
|
|
implementation 'com.baomidou:mybatis-plus-jsqlparser:3.5.12'// MyBatis Plus SQL 解析器,MyBatis Plus 的内部依赖(用于条件构造器)
|
|
implementation 'ch.qos.logback:logback-core:1.5.16' // Logback 核心库,用于日志输出
|
|
implementation 'cn.hutool:hutool-all:5.8.39'// Hutool 工具包,提供各种常用工具类,如日期处理、IO、字符串等
|
|
implementation 'com.github.xiaoymin:knife4j-openapi3-jakarta-spring-boot-starter:4.5.0'// Knife4j Swagger 增强工具,提供更友好的 API 文档界面
|
|
implementation 'jakarta.annotation:jakarta.annotation-api:3.0.0' // Jakarta 标准注解包(如 @PostConstruct、@Resource 等)
|
|
implementation 'com.fazecast:jSerialComm:2.11.2'// 串口通信库 jSerialComm,用于与硬件设备通过串口通信
|
|
implementation 'com.opencsv:opencsv:5.11.2'// CSV 解析器 OpenCSV,用于读写 CSV 文件
|
|
implementation 'org.java-websocket:Java-WebSocket:1.6.0'
|
|
implementation fileTree(dir: 'lib', include: '*.jar')// 引入本地 lib 目录下的所有 jar 包
|
|
implementation 'org.apache.poi:poi-ooxml:5.4.1'
|
|
compileOnly 'org.projectlombok:lombok' // Lombok 提供简化 Java 开发的注解(如 @Getter @Setter 等),编译期依赖
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'// 单元测试支持,包含 JUnit、Mockito 等常用测试库
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'// JUnit 平台运行时,用于在测试时启动 JUnit Platform(例如在 IDE 或构建工具中运行测试)
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|