Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
22ad2542
提交
22ad2542
authored
4月 20, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'dev' 到 'beta'
Dev 查看合并请求
!24
上级
43e7c28f
2dd82c68
流水线
#2045
已失败 于阶段
in 41 秒
变更
10
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
59 行增加
和
69 行删除
+59
-69
build.gradle
app/build.gradle
+1
-0
application-dev-mysql.yml
app/src/main/resources/application-dev-mysql.yml
+11
-14
application-mock.yml
app/src/main/resources/application-mock.yml
+9
-12
build.gradle
basic-auth/build.gradle
+1
-4
Permissions.java
...-auth/src/main/java/com/yiring/auth/util/Permissions.java
+1
-1
build.gradle
basic-common/core/build.gradle
+0
-3
ValidateUtil.java
.../main/java/com/yiring/common/validation/ValidateUtil.java
+1
-1
Commons.java
...on/util/src/main/java/com/yiring/common/util/Commons.java
+6
-6
build.gradle
basic-dict/build.gradle
+0
-3
build.gradle
build.gradle
+29
-25
没有找到文件。
app/build.gradle
浏览文件 @
22ad2542
...
...
@@ -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
...
...
app/src/main/resources/application-dev-mysql.yml
浏览文件 @
22ad2542
...
...
@@ -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}
...
...
app/src/main/resources/application-mock.yml
浏览文件 @
22ad2542
...
...
@@ -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}
...
...
basic-auth/build.gradle
浏览文件 @
22ad2542
...
...
@@ -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
...
...
basic-auth/src/main/java/com/yiring/auth/util/Permissions.java
浏览文件 @
22ad2542
...
...
@@ -91,7 +91,7 @@ public class Permissions {
)
)
.
peek
(
item
->
{
if
(
Commons
.
n
otEmpty
(
item
.
getChildren
()))
{
if
(
Commons
.
isN
otEmpty
(
item
.
getChildren
()))
{
item
.
setChildren
(
sortMenuTreeVo
(
item
.
getChildren
()));
}
})
...
...
basic-common/core/build.gradle
浏览文件 @
22ad2542
...
...
@@ -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}"
...
...
basic-common/core/src/main/java/com/yiring/common/validation/ValidateUtil.java
浏览文件 @
22ad2542
...
...
@@ -34,7 +34,7 @@ public class ValidateUtil {
@Cleanup
ValidatorFactory
factory
=
Validation
.
buildDefaultValidatorFactory
();
Set
<
ConstraintViolation
<
T
>>
constraintViolations
=
factory
.
getValidator
().
validate
(
t
,
groups
);
if
(
Commons
.
n
otEmpty
(
constraintViolations
))
{
if
(
Commons
.
isN
otEmpty
(
constraintViolations
))
{
throw
new
ConstraintViolationException
(
constraintViolations
);
}
}
...
...
basic-common/util/src/main/java/com/yiring/common/util/Commons.java
浏览文件 @
22ad2542
/* (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
n
otEmpty
(
Collection
<?>
collection
)
{
public
boolean
isN
otEmpty
(
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
(
!
not
Empty
(
list
))
{
if
(
CollUtil
.
is
Empty
(
list
))
{
return
Collections
.
emptyList
();
}
...
...
basic-dict/build.gradle
浏览文件 @
22ad2542
...
...
@@ -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}"
...
...
build.gradle
浏览文件 @
22ad2542
...
...
@@ -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.1
7
.0"
id
"com.diffplug.spotless"
version
"6.1
8
.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.1
5
'
// https://
mvnrepository
.com/artifact/com.alibaba.fastjson2/fastjson2
fastJsonVersion
=
'2.0.2
6
'
// 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.1
8
'
// https://
central.sonatype
.com/artifact/com.alibaba.fastjson2/fastjson2
fastJsonVersion
=
'2.0.2
8
'
// 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.2
7
'
// https://
mvnrepository
.com/artifact/net.bramp.ffmpeg/ffmpeg
// https://
central.sonatype
.com/artifact/org.apache.pdfbox/pdfbox
pdfboxVersion
=
'2.0.2
8
'
// https://
central.sonatype
.com/artifact/net.bramp.ffmpeg/ffmpeg
// FIXED: ffmpeg 4.x
ffmpegWrapperVersion
=
'0.7.0'
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论