提交 22ad2542 作者: 方治民

合并分支 'dev' 到 'beta'

Dev

查看合并请求 !24
流水线 #2045 已失败 于阶段
in 41 秒
......@@ -15,6 +15,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// 💬 Mock/Test Env
runtimeOnly 'com.h2database:h2'
// 💬 Prod/Dev Env
......
......@@ -2,15 +2,15 @@
env:
host: 127.0.0.1
prod: false
extra:
props:
username: admin
password: Hd)XZgtCa&NG~oe@
spring:
datasource:
url: jdbc:mysql://${env.host}:3306/basic_app?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: ${env.extra.username}
password: ${env.extra.password}
username: ${env.props.username}
password: ${env.props.password}
jpa:
database-platform: org.hibernate.dialect.MySQL8Dialect
open-in-view: true
......@@ -20,27 +20,24 @@ spring:
properties:
hibernate:
format_sql: true
redis:
database: 5
host: ${env.host}
port: 6379
password: ${env.extra.password}
data:
redis:
database: 5
port: 6379
host: ${env.host}
password: ${env.props.password}
# knife4j
knife4j:
enable: true
basic:
enable: false
username: ${env.extra.username}
password: ${env.extra.password}
setting:
enableOpenApi: false
enableDebug: true
# minio
minio:
access-key: ${env.extra.username}
secret-key: ${env.extra.password}
access-key: ${env.props.username}
secret-key: ${env.props.password}
end-point: "http://${env.host}:18100"
bucket: public
domain: ${minio.end-point}
......
......@@ -2,7 +2,7 @@
env:
host: 127.0.0.1
prod: false
extra:
props:
username: admin
password: Hd)XZgtCa&NG~oe@
......@@ -20,27 +20,24 @@ spring:
h2:
console:
enabled: true
redis:
database: 5
host: ${env.host}
port: 6379
password: ${env.extra.password}
data:
redis:
database: 5
port: 6379
host: ${env.host}
password: ${env.props.password}
# knife4j
knife4j:
enable: true
basic:
enable: false
username: ${env.extra.username}
password: ${env.extra.password}
setting:
enableOpenApi: true
enableDebug: true
# minio
minio:
access-key: ${env.extra.username}
secret-key: ${env.extra.password}
access-key: ${env.props.username}
secret-key: ${env.props.password}
end-point: "http://${env.host}:18100"
bucket: public
domain: ${minio.end-point}
......
......@@ -5,16 +5,13 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// 本地依赖
implementation fileTree(dir: project.rootDir.getPath() + '\\libs', includes: ['*jar'])
// swagger(knife4j)
implementation "com.github.xiaoymin:knife4j-openapi3-jakarta-spring-boot-starter:${knife4jOpen3Version}"
// sa-token
implementation "cn.dev33:sa-token-spring-boot3-starter:${saTokenVersion}"
implementation "cn.dev33:sa-token-dao-redis-jackson:${saTokenVersion}"
// Sa-Token 整合 Redis (使用 jackson 序列化方式)
implementation "cn.dev33:sa-token-dao-redis-jackson:${saTokenVersion}"
implementation 'org.apache.commons:commons-pool2'
// fastjson
......
......@@ -91,7 +91,7 @@ public class Permissions {
)
)
.peek(item -> {
if (Commons.notEmpty(item.getChildren())) {
if (Commons.isNotEmpty(item.getChildren())) {
item.setChildren(sortMenuTreeVo(item.getChildren()));
}
})
......
......@@ -7,9 +7,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// 本地依赖
implementation fileTree(dir: project.rootDir.getPath() + '\\libs', includes: ['*jar'])
// swagger(knife4j)
implementation "com.github.xiaoymin:knife4j-openapi3-jakarta-spring-boot-starter:${knife4jOpen3Version}"
......
......@@ -34,7 +34,7 @@ public class ValidateUtil {
@Cleanup
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
Set<ConstraintViolation<T>> constraintViolations = factory.getValidator().validate(t, groups);
if (Commons.notEmpty(constraintViolations)) {
if (Commons.isNotEmpty(constraintViolations)) {
throw new ConstraintViolationException(constraintViolations);
}
}
......
/* (C) 2021 YiRing, Inc. */
package com.yiring.common.util;
import cn.hutool.core.collection.CollUtil;
import jakarta.servlet.http.HttpServletRequest;
import java.lang.reflect.Constructor;
import java.util.*;
import lombok.NonNull;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
......@@ -71,7 +71,7 @@ public class Commons {
* @param collection 集合
* @return 是否为空
*/
public boolean notEmpty(Collection<?> collection) {
public boolean isNotEmpty(Collection<?> collection) {
return collection != null && !collection.isEmpty();
}
......@@ -96,7 +96,7 @@ public class Commons {
*/
public <T> T transform(Object source, Class<T> type, String... ignoreProperties) {
try {
if (source == null) {
if (Objects.isNull(source)) {
return null;
}
......@@ -121,7 +121,7 @@ public class Commons {
* @param <S> 原类型集合
* @return 目标集合
*/
public <T, S> List<T> transform(@NonNull List<S> list, Class<T> type, String... ignoreProperties) {
public <T, S> List<T> transform(List<S> list, Class<T> type, String... ignoreProperties) {
return transform(list, type, null, ignoreProperties);
}
......@@ -137,12 +137,12 @@ public class Commons {
* @return 目标集合
*/
public <T, S> List<T> transform(
@NonNull List<S> list,
List<S> list,
Class<T> type,
CallbackFunction<S, T> fn,
String... ignoreProperties
) {
if (!notEmpty(list)) {
if (CollUtil.isEmpty(list)) {
return Collections.emptyList();
}
......
......@@ -5,9 +5,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// 本地依赖
implementation fileTree(dir: project.rootDir.getPath() + '\\libs', includes: ['*jar'])
// swagger(knife4j)
implementation "com.github.xiaoymin:knife4j-openapi3-jakarta-spring-boot-starter:${knife4jOpen3Version}"
......
......@@ -6,13 +6,17 @@ plugins {
// https://plugins.gradle.org/plugin/io.spring.dependency-management
id 'io.spring.dependency-management' version '1.1.0'
// https://plugins.gradle.org/plugin/com.diffplug.spotless
id "com.diffplug.spotless" version "6.17.0"
id "com.diffplug.spotless" version "6.18.0"
}
ext {
// 🌐 Repository's Search
// https://mvnrepository.com/
// https://central.sonatype.com/
// Spotless
// https://www.npmjs.com/package/prettier
prettierVersion = '2.8.6'
prettierVersion = '2.8.7'
// https://www.npmjs.com/package/prettier-plugin-java
prettierJavaVersion = '2.1.0'
......@@ -20,39 +24,39 @@ ext {
// https://start.spring.io/
springCloudVersion = '2022.0.1'
// springBootAdminVersion
// https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-starter-server
// https://central.sonatype.com/artifact/de.codecentric/spring-boot-admin-starter-server
springBootAdminVersion = '3.0.2'
// Dependencies
// https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-openapi3-jakarta-spring-boot-starter
// https://central.sonatype.com/artifact/com.github.xiaoymin/knife4j-openapi3-jakarta-spring-boot-starter
knife4jOpen3Version = '4.1.0'
// https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations
// https://central.sonatype.com/artifact/io.swagger/swagger-annotations
swaggerAnnotationsVersion = '2.2.8'
// https://mvnrepository.com/artifact/cn.dev33/sa-token-spring-boot3-starter
// https://central.sonatype.com/artifact/cn.dev33/sa-token-spring-boot3-starter
saTokenVersion = '1.34.0'
// https://mvnrepository.com/artifact/cn.hutool/hutool-all
hutoolVersion = '5.8.15'
// https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2
fastJsonVersion = '2.0.26'
// https://mvnrepository.com/artifact/com.xuxueli/xxl-job-core
xxlJobVersion = '2.3.1'
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
okhttpVersion = '4.10.0'
// https://mvnrepository.com/artifact/io.minio/minio
// https://central.sonatype.com/artifact/cn.hutool/hutool-core
hutoolVersion = '5.8.18'
// https://central.sonatype.com/artifact/com.alibaba.fastjson2/fastjson2
fastJsonVersion = '2.0.28'
// https://central.sonatype.com/artifact/com.xuxueli/xxl-job-core
xxlJobVersion = '2.4.0'
// https://central.sonatype.com/artifact/com.squareup.okhttp3/okhttp
okhttpVersion = '4.9.3'
// https://central.sonatype.com/artifact/io.minio/minio
minioVersion = '8.5.2'
// https://mvnrepository.com/artifact/io.hypersistence/hypersistence-utils-hibernate-60
hibernateTypesVersion = '3.2.0'
// https://mvnrepository.com/artifact/org.hibernate.orm/hibernate-spatial
hibernateSpatialVersion = '6.1.7.Final'
// https://mvnrepository.com/artifact/org.locationtech.jts/jts-core
// https://central.sonatype.com/artifact/io.hypersistence/hypersistence-utils-hibernate-60
hibernateTypesVersion = '3.3.2'
// https://central.sonatype.com/artifact/org.hibernate.orm/hibernate-spatial
hibernateSpatialVersion = '6.2.1.Final'
// https://central.sonatype.com/artifact/org.locationtech.jts/jts-core
jtsVersion = '1.19.0'
// https://mvnrepository.com/artifact/com.github.liaochong/myexcel
// https://central.sonatype.com/artifact/com.github.liaochong/myexcel
myexcelVersion = '4.2.2'
// https://mvnrepository.com/artifact/org.jetbrains/annotations
// https://central.sonatype.com/artifact/org.jetbrains/annotations
jetbrainsAnnotationsVersion = '24.0.1'
// https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox
pdfboxVersion = '2.0.27'
// https://mvnrepository.com/artifact/net.bramp.ffmpeg/ffmpeg
// https://central.sonatype.com/artifact/org.apache.pdfbox/pdfbox
pdfboxVersion = '2.0.28'
// https://central.sonatype.com/artifact/net.bramp.ffmpeg/ffmpeg
// FIXED: ffmpeg 4.x
ffmpegWrapperVersion = '0.7.0'
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论