feat(utils): 添加高精度时间获取功能并优化相关工具类
- 新增 AutoConfiguration 类,用于 Spring Boot 自动配置 - 添加高精度时间获取功能,兼容 Java1.8 及以上版本- 优化 DateTime 类,增加 fileTimeToLocalDateTime 方法 - 更新 ForEach 类,增加对基本类型数组的遍历支持 -调整 Factory 类,使用 BEANS 和 TYPE_BEANS 替代原变量名 - 更新 ByteUtil 类,添加常用字节常量- 修改 HashUtils 类,优化文件读取缓冲区大小
This commit is contained in:
+39
-5
@@ -1,3 +1,6 @@
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
plugins {
|
||||
idea
|
||||
id("java-library")
|
||||
@@ -22,18 +25,17 @@ java {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
annotationProcessor("org.jetbrains:annotations:24.0.0")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.38")
|
||||
compileOnly("org.springframework.boot:spring-boot-starter:2.7.14")
|
||||
compileOnly("com.fasterxml.jackson.core:jackson-databind:2.19.2")
|
||||
compileOnly("org.mybatis:mybatis:3.5.19")
|
||||
|
||||
compileOnly("org.projectlombok:lombok:1.18.38")
|
||||
implementation("org.bouncycastle:bcprov-jdk18on:1.81")
|
||||
implementation("com.github.f4b6a3:uuid-creator:6.1.0")
|
||||
implementation("org.mindrot:jbcrypt:0.4")
|
||||
implementation("org.jetbrains:annotations:24.0.0")
|
||||
compileOnly("org.projectlombok:lombok:1.18.38")
|
||||
|
||||
annotationProcessor("org.jetbrains:annotations:24.0.0")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.38")
|
||||
implementation("net.java.dev.jna:jna:5.17.0")
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +61,22 @@ tasks.withType<Javadoc> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks.withType<org.gradle.jvm.tasks.Jar> {
|
||||
manifest {
|
||||
attributes(
|
||||
mapOf(
|
||||
"Implementation-Title" to ARTIFACTID,
|
||||
"Implementation-Version" to VERSIONS,
|
||||
"Implementation-Package" to GROUPSID,
|
||||
"Implementation-Vendor" to "minglipro",
|
||||
"Implementation-Build-Time" to LocalDateTime.now()
|
||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSSSSSS"))
|
||||
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
@@ -79,3 +97,19 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.processResources {
|
||||
filesMatching("META-INF/meta-data") {
|
||||
expand(
|
||||
mapOf(
|
||||
"buildTime" to LocalDateTime.now()
|
||||
.format(
|
||||
DateTimeFormatter.ofPattern(
|
||||
"yyyy-MM-dd HH:mm:ss.SSSSSSS"
|
||||
)
|
||||
)
|
||||
) + project.properties
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user