Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
New MineTRS_java
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kiritoausna
New MineTRS_java
Commits
faf3ed4d
Commit
faf3ed4d
authored
Sep 17, 2025
by
kiritoausna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
德兴
parent
2f9eb135
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
FileUtil.java
eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java
+23
-0
application-dev.yml
eladmin-system/src/main/resources/config/application-dev.yml
+2
-2
application.yml
eladmin-system/src/main/resources/config/application.yml
+4
-4
No files found.
eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java
View file @
faf3ed4d
...
...
@@ -38,6 +38,7 @@ import java.text.SimpleDateFormat;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
/**
* File工具类,扩展 hutool 工具包
...
...
@@ -207,6 +208,28 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
}
return
null
;
}
/**
* 返回 文件名部分
* @param multipartFiles
* @param picDirPath
* @return
* @throws IOException
*/
public
static
String
savePicReturnFileName
(
MultipartFile
multipartFiles
,
String
picDirPath
)
throws
IOException
{
File
dir
=
new
File
(
picDirPath
);
if
(!
dir
.
exists
()){
dir
.
mkdir
();
}
long
currentTimeMillis
=
System
.
currentTimeMillis
();
String
originalFilename
=
multipartFiles
.
getOriginalFilename
();
String
suffxiName
=
originalFilename
.
substring
(
originalFilename
.
lastIndexOf
(
"."
));
String
fileName
=
UUID
.
randomUUID
().
toString
()
+
suffxiName
;
String
filePath
=
picDirPath
+
"/"
+
fileName
;
File
canonicalFile
=
new
File
(
filePath
).
getCanonicalFile
();
multipartFiles
.
transferTo
(
canonicalFile
);
// Thumbnails.of(inputStream).scale(1d).outputQuality(0.5f).toFile(filePath);
return
fileName
.
toString
();
}
/**
* 导出excel
...
...
eladmin-system/src/main/resources/config/application-dev.yml
View file @
faf3ed4d
...
...
@@ -5,7 +5,7 @@ spring:
connectionProperties
:
druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000
db-type
:
com.alibaba.druid.pool.DruidDataSource
driverClassName
:
net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url
:
jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3310}/${DB_NAME:
zhonghe
}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=true&requireSSL=true
url
:
jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3310}/${DB_NAME:
tsknew
}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=true&requireSSL=true
username
:
${DB_USER:root}
#password: ${DB_PWD:jinghe2021//}
password
:
${DB_PWD:jinghe2023}
...
...
@@ -54,7 +54,7 @@ spring:
# 登录相关配置
login
:
# 登录缓存
cache-enable
:
tru
e
cache-enable
:
fals
e
# 是否限制单用户登录
single-login
:
false
# 验证码
...
...
eladmin-system/src/main/resources/config/application.yml
View file @
faf3ed4d
server
:
port
:
90
03
port
:
90
15
spring
:
freemarker
:
check-template-location
:
false
profiles
:
active
:
prod
active
:
dev
jackson
:
time-zone
:
GMT+8
data
:
...
...
@@ -28,9 +28,9 @@ spring:
redis
:
#数据库索引
database
:
${REDIS_DB:0}
host
:
${REDIS_HOST:
8.142.46.12
6}
host
:
${REDIS_HOST:
192.168.2.1
6}
port
:
${REDIS_PORT:6379}
password
:
${REDIS_PWD:}
password
:
${REDIS_PWD:
123456
}
#连接超时时间
timeout
:
5000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment