提交 22ad2542 作者: 方治民

合并分支 'dev' 到 'beta'

Dev

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