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.
 
 
 
 
 
 

167 lines
5.7 KiB

buildscript {
ext {
springBootVersion = '3.3.5'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 21
targetCompatibility = 21
repositories {
mavenCentral()
maven { name "Alibaba" ; url 'https://maven.aliyun.com/repository/public' }
maven { name "Bstek" ; url 'https://nexus.bsdn.org/content/groups/public/' }
maven { name "M2" ; url 'https://plugins.gradle.org/m2/' }
maven { name "Jitpack" ; url 'https://jitpack.io' }
mavenLocal()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-aop'
// implementation 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation' // 这是 Spring Boot 的验证启动器,包含 Hibernate Validator
implementation 'org.hibernate.validator:hibernate-validator:8.0.0.Final' // 如果需要,显式添加 Hibernate Validator 依赖
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// WebSocket 支持
implementation 'org.springframework.boot:spring-boot-starter-websocket'
//域控管理
implementation 'org.springframework.boot:spring-boot-starter-data-ldap'
//邮件的包
implementation 'org.springframework.boot:spring-boot-starter-mail'
// MyBatis-Plus Spring Boot Starter
implementation 'com.baomidou:mybatis-plus-boot-starter:3.5.8'
// Quartz 定时任务
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation('org.quartz-scheduler:quartz:2.3.2') {
exclude group: 'com.mchange', module: 'c3p0'
}
// Jakarta API 依赖 (Java 9+ 必须)
implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1'
implementation 'jakarta.servlet:jakarta.servlet-api:6.0.0'
implementation 'jakarta.validation:jakarta.validation-api:3.0.2'
implementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
implementation 'jakarta.mail:jakarta.mail-api:2.1.3'
implementation 'org.eclipse.angus:angus-mail:2.0.3' // Jakarta Mail 实现
testImplementation 'org.springframework.boot:spring-boot-starter-test'
//shiro依赖
implementation('org.apache.shiro:shiro-spring:1.13.0:jakarta') {
exclude group: 'org.apache.shiro', module: 'shiro-core'
exclude group: 'org.apache.shiro', module: 'shiro-web'
}
implementation 'org.apache.shiro:shiro-core:1.13.0:jakarta'
implementation('org.apache.shiro:shiro-web:1.13.0:jakarta') {
exclude group: 'org.apache.shiro', module: 'shiro-core'
}
// 云存储 SDK
implementation 'com.aliyun.oss:aliyun-sdk-oss:2.8.3'
implementation 'com.qiniu:qiniu-java-sdk:7.2.23'
implementation('com.qcloud:cos_api:4.4') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
//阿里duid
implementation 'com.alibaba:druid-spring-boot-3-starter:1.2.23'
//fastjson2 (更新到最新版本以包含完整的 parser 包)
implementation 'com.alibaba.fastjson2:fastjson2:2.0.53'
implementation 'com.alibaba.fastjson2:fastjson2-extension-spring6:2.0.53'
implementation 'org.apache.commons:commons-lang3:3.14.0'
implementation 'org.apache.commons:commons-text:1.11.0' // StringEscapeUtils 已移到此库
implementation 'com.google.guava:guava:29.0-jre'
//处理httpclient
implementation 'org.apache.httpcomponents:httpclient:4.5'
//数据库驱动
//implementation 'com.microsoft.sqlserver:mssql-jdbc:12.4.2.jre11' // SQL Server JDBC 驱动 (Java 11+)
// 本地JAR文件
implementation(fileTree('lib'))
implementation(fileTree('jar')) // Aspose Words/Cells 等本地 JAR
//ftp要使用的包
implementation 'commons-net:commons-net:3.6'
//
implementation 'commons-lang:commons-lang:2.6'
implementation 'commons-io:commons-io:2.15.1' // 升级到最新版本以支持 UnsynchronizedByteArrayOutputStream
implementation 'joda-time:joda-time:2.9.9'
// JWT 依赖 (0.12.x 版本需要分开引入)
implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.5'
//j2mod进行Modbus TCP通讯并获取数据
implementation 'com.ghgande:j2mod:2.7.0'
implementation 'com.google.code.gson:gson:2.8.9' // 使用最新稳定版本
compileOnly 'org.projectlombok:lombok:1.18.30' // 使用最新版本
annotationProcessor 'org.projectlombok:lombok:1.18.30' // 启用注解处理器
implementation 'com.github.axet:kaptcha:0.0.9' // 使用最新稳定版本
// PageHelper 分页插件
implementation 'com.github.pagehelper:pagehelper-spring-boot-starter:2.1.0'
// easyexcel
implementation 'com.alibaba:easyexcel:3.1.2'
// PDF生成依赖
implementation 'com.itextpdf:itext7-core:7.2.5'
implementation 'com.itextpdf:html2pdf:4.0.5'
// Excel/Word 处理库
implementation 'com.luhuiguo:aspose-cells:23.1'
implementation 'org.apache.poi:poi:5.2.3'
implementation 'org.apache.poi:poi-ooxml:5.2.3'
implementation 'org.apache.xmlbeans:xmlbeans:5.2.2'
implementation 'com.google.zxing:core:3.5.3'
implementation 'com.google.zxing:javase:3.5.3'
}
test {
useJUnitPlatform()
}
processResources {
duplicatesStrategy = 'include'
}
sourceSets {
main {
resources {
//可以将java目录下的所有非.java资源打包到classes下
srcDir 'src/main/resources'
}
}
}