后端逻辑更新
This commit is contained in:
parent
624dacfe12
commit
a1e5554823
@ -1,212 +1,9 @@
|
||||
11:56:44.842 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
11:56:44.859 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 19.0.1 with PID 18717 (/Users/lan/minio-project-master/minio-admin/target/classes started by lan in /Users/lan/minio-project-master/minio-admin)
|
||||
11:56:44.861 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
11:56:47.883 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
11:56:47.885 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
11:56:47.885 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
11:56:47.954 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
11:56:49.612 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
11:56:49.642 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 5.269 seconds (process running for 7.524)
|
||||
12:14:01.766 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
12:14:01.881 [http-nio-9090-exec-1] INFO c.m.c.FileMinioController - [checkFileUploadedByMd5,74] - REST: 閫氳繃鏌ヨ<E98F8C> <036ee500fdb624314479780c6daf547d> 鏂囦欢鏄<E6ACA2>惁瀛樺湪銆佹槸鍚﹁繘琛屾柇鐐圭画浼<E794BB>
|
||||
12:14:01.882 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,48] - tip message: 閫氳繃 <036ee500fdb624314479780c6daf547d> 鏌ヨ<E98F8C>redis鏄<73>惁瀛樺湪
|
||||
12:14:02.490 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,59] - tip message: 閫氳繃 <036ee500fdb624314479780c6daf547d> 鏌ヨ<E98F8C>mysql鏄<6C>惁瀛樺湪
|
||||
12:14:02.681 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,110] - HikariPool-1 - Starting...
|
||||
12:14:02.962 [http-nio-9090-exec-1] INFO c.z.h.p.HikariPool - [checkFailFast,565] - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@1b0794cd
|
||||
12:14:02.964 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,123] - HikariPool-1 - Start completed.
|
||||
12:14:03.297 [http-nio-9090-exec-2] INFO c.m.c.FileMinioController - [initMultiPartUpload,90] - REST: 閫氳繃 <FileUploadInfo(fileName=image.png, fileSize=1680162, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=036ee500fdb624314479780c6daf547d, fileType=image, chunkUploadedList=[])> 鍒濆<E98D92>鍖栦笂浼犱换鍔<E68DA2>
|
||||
12:14:03.301 [http-nio-9090-exec-2] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,85] - tip message: 閫氳繃 <FileUploadInfo(fileName=image.png, fileSize=1680162, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=036ee500fdb624314479780c6daf547d, fileType=image, chunkUploadedList=[])> 寮€濮嬪垵濮嬪寲<鍒嗙墖涓婁紶>浠诲姟
|
||||
12:14:03.834 [http-nio-9090-exec-2] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,91] - tip message: 褰撳墠鍒嗙墖鏁伴噺 <1> 杩涜<E69DA9>鍗曟枃浠朵笂浼<E7AC82>
|
||||
12:14:03.847 [http-nio-9090-exec-2] INFO c.m.c.MybatisPlusConfig - [insertFill,37] - start insert fill ....
|
||||
12:14:03.941 [http-nio-9090-exec-2] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,64] - tip message: 閫氳繃 <036ee500fdb624314479780c6daf547d.png-image> 寮€濮嬪崟鏂囦欢涓婁紶<minio>
|
||||
12:14:03.947 [http-nio-9090-exec-2] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,74] - tip message: 鍗曚釜鏂囦欢涓婁紶銆佹垚鍔<E59E9A>
|
||||
12:18:57.075 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,350] - HikariPool-1 - Shutdown initiated...
|
||||
12:18:57.082 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,352] - HikariPool-1 - Shutdown completed.
|
||||
12:19:02.637 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
12:19:02.653 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 19.0.1 with PID 20456 (/Users/lan/minio-project-master/minio-admin/target/classes started by lan in /Users/lan/minio-project-master/minio-admin)
|
||||
12:19:02.654 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
12:19:04.851 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
12:19:04.851 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
12:19:04.852 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
12:19:04.915 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
12:19:06.455 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
12:19:06.558 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 4.334 seconds (process running for 5.695)
|
||||
12:19:30.858 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
12:19:30.918 [http-nio-9090-exec-1] INFO c.m.c.FileMinioController - [checkFileUploadedByMd5,74] - REST: 閫氳繃鏌ヨ<E98F8C> <dcf813524ee0f39b6d73aba673f2fe2d> 鏂囦欢鏄<E6ACA2>惁瀛樺湪銆佹槸鍚﹁繘琛屾柇鐐圭画浼<E794BB>
|
||||
12:19:30.919 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,48] - tip message: 閫氳繃 <dcf813524ee0f39b6d73aba673f2fe2d> 鏌ヨ<E98F8C>redis鏄<73>惁瀛樺湪
|
||||
12:19:31.237 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,59] - tip message: 閫氳繃 <dcf813524ee0f39b6d73aba673f2fe2d> 鏌ヨ<E98F8C>mysql鏄<6C>惁瀛樺湪
|
||||
12:19:31.343 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,110] - HikariPool-1 - Starting...
|
||||
12:19:31.551 [http-nio-9090-exec-1] INFO c.z.h.p.HikariPool - [checkFailFast,565] - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@42d42417
|
||||
12:19:31.552 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,123] - HikariPool-1 - Start completed.
|
||||
12:19:31.708 [http-nio-9090-exec-2] INFO c.m.c.FileMinioController - [initMultiPartUpload,90] - REST: 閫氳繃 <FileUploadInfo(fileName=闄㈠窘.png, fileSize=26909, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=dcf813524ee0f39b6d73aba673f2fe2d, fileType=image, chunkUploadedList=[])> 鍒濆<E98D92>鍖栦笂浼犱换鍔<E68DA2>
|
||||
12:19:31.712 [http-nio-9090-exec-2] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,85] - tip message: 閫氳繃 <FileUploadInfo(fileName=闄㈠窘.png, fileSize=26909, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=dcf813524ee0f39b6d73aba673f2fe2d, fileType=image, chunkUploadedList=[])> 寮€濮嬪垵濮嬪寲<鍒嗙墖涓婁紶>浠诲姟
|
||||
12:19:32.184 [http-nio-9090-exec-2] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,91] - tip message: 褰撳墠鍒嗙墖鏁伴噺 <1> 杩涜<E69DA9>鍗曟枃浠朵笂浼<E7AC82>
|
||||
12:19:32.202 [http-nio-9090-exec-2] INFO c.m.c.MybatisPlusConfig - [insertFill,37] - start insert fill ....
|
||||
12:19:32.279 [http-nio-9090-exec-2] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,64] - tip message: 閫氳繃 <dcf813524ee0f39b6d73aba673f2fe2d.png-image> 寮€濮嬪崟鏂囦欢涓婁紶<minio>
|
||||
12:19:32.287 [http-nio-9090-exec-2] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,74] - tip message: 鍗曚釜鏂囦欢涓婁紶銆佹垚鍔<E59E9A>
|
||||
12:35:11.549 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,350] - HikariPool-1 - Shutdown initiated...
|
||||
12:35:11.575 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,352] - HikariPool-1 - Shutdown completed.
|
||||
14:59:06.483 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
14:59:06.493 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 11052 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
14:59:06.494 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
14:59:07.460 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
14:59:07.460 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
14:59:07.460 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
14:59:07.493 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
14:59:08.220 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
14:59:08.238 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.976 seconds (process running for 2.74)
|
||||
15:06:31.118 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
15:06:31.147 [http-nio-9090-exec-1] INFO c.m.c.FileMinioController - [checkFileUploadedByMd5,74] - REST: 通过查询 <d4352583feb4f6562a5c831aace01ce1> 文件是否存在、是否进行断点续传
|
||||
15:06:31.147 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,48] - tip message: 通过 <d4352583feb4f6562a5c831aace01ce1> 查询redis是否存在
|
||||
15:06:31.371 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,59] - tip message: 通过 <d4352583feb4f6562a5c831aace01ce1> 查询mysql是否存在
|
||||
15:06:31.421 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,110] - HikariPool-1 - Starting...
|
||||
15:06:31.833 [http-nio-9090-exec-1] INFO c.z.h.p.HikariPool - [checkFailFast,565] - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@54691a3
|
||||
15:06:31.834 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,123] - HikariPool-1 - Start completed.
|
||||
15:06:31.915 [http-nio-9090-exec-3] INFO c.m.c.FileMinioController - [initMultiPartUpload,90] - REST: 通过 <FileUploadInfo(fileName=微信图片_20230407024048.jpg, fileSize=309622, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=d4352583feb4f6562a5c831aace01ce1, fileType=image, chunkUploadedList=[])> 初始化上传任务
|
||||
15:06:31.917 [http-nio-9090-exec-3] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,85] - tip message: 通过 <FileUploadInfo(fileName=微信图片_20230407024048.jpg, fileSize=309622, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=d4352583feb4f6562a5c831aace01ce1, fileType=image, chunkUploadedList=[])> 开始初始化<分片上传>任务
|
||||
15:06:32.157 [http-nio-9090-exec-3] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,91] - tip message: 当前分片数量 <1> 进行单文件上传
|
||||
15:06:32.165 [http-nio-9090-exec-3] INFO c.m.c.MybatisPlusConfig - [insertFill,37] - start insert fill ....
|
||||
15:06:32.307 [http-nio-9090-exec-3] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,64] - tip message: 通过 <d4352583feb4f6562a5c831aace01ce1.jpg-image> 开始单文件上传<minio>
|
||||
15:06:32.312 [http-nio-9090-exec-3] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,74] - tip message: 单个文件上传、成功
|
||||
15:18:43.669 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,350] - HikariPool-1 - Shutdown initiated...
|
||||
15:18:43.671 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,352] - HikariPool-1 - Shutdown completed.
|
||||
15:18:52.280 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
15:18:52.294 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 111164 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
15:18:52.295 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
15:18:53.049 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
15:18:53.050 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
15:18:53.050 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
15:18:53.086 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
15:18:53.658 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
15:18:53.677 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.577 seconds (process running for 2.039)
|
||||
15:20:02.328 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
15:20:02.354 [http-nio-9090-exec-1] INFO c.m.c.FileMinioController - [checkFileUploadedByMd5,74] - REST: 通过查询 <d4352583feb4f6562a5c831aace01ce1> 文件是否存在、是否进行断点续传
|
||||
15:20:02.355 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,48] - tip message: 通过 <d4352583feb4f6562a5c831aace01ce1> 查询redis是否存在
|
||||
15:20:02.581 [http-nio-9090-exec-1] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,59] - tip message: 通过 <d4352583feb4f6562a5c831aace01ce1> 查询mysql是否存在
|
||||
15:20:02.617 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,110] - HikariPool-1 - Starting...
|
||||
15:20:02.807 [http-nio-9090-exec-1] INFO c.z.h.p.HikariPool - [checkFailFast,565] - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@5ba8145c
|
||||
15:20:02.808 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,123] - HikariPool-1 - Start completed.
|
||||
15:20:02.906 [http-nio-9090-exec-2] INFO c.m.c.FileMinioController - [checkFileUploadedByMd5,74] - REST: 通过查询 <20b919730ee383d47e4c008f11652b02> 文件是否存在、是否进行断点续传
|
||||
15:20:02.906 [http-nio-9090-exec-2] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,48] - tip message: 通过 <20b919730ee383d47e4c008f11652b02> 查询redis是否存在
|
||||
15:20:02.908 [http-nio-9090-exec-2] INFO c.m.s.i.UploadServiceImpl - [getByFileMD5,59] - tip message: 通过 <20b919730ee383d47e4c008f11652b02> 查询mysql是否存在
|
||||
15:20:02.933 [http-nio-9090-exec-3] INFO c.m.c.FileMinioController - [initMultiPartUpload,90] - REST: 通过 <FileUploadInfo(fileName=报名照片.jpg, fileSize=12700, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=20b919730ee383d47e4c008f11652b02, fileType=image, chunkUploadedList=[])> 初始化上传任务
|
||||
15:20:02.935 [http-nio-9090-exec-3] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,85] - tip message: 通过 <FileUploadInfo(fileName=报名照片.jpg, fileSize=12700, contentType=application/octet-stream, chunkNum=1, uploadId=null, chunkSize=10485760, fileMd5=20b919730ee383d47e4c008f11652b02, fileType=image, chunkUploadedList=[])> 开始初始化<分片上传>任务
|
||||
15:20:03.137 [http-nio-9090-exec-3] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,91] - tip message: 当前分片数量 <1> 进行单文件上传
|
||||
15:20:03.144 [http-nio-9090-exec-3] INFO c.m.c.MybatisPlusConfig - [insertFill,37] - start insert fill ....
|
||||
15:20:03.248 [http-nio-9090-exec-3] INFO c.m.s.i.UploadServiceImpl - [initMultiPartUpload,94] - -------文件名20b919730ee383d47e4c008f11652b02.jpg
|
||||
15:20:03.249 [http-nio-9090-exec-3] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,64] - tip message: 通过 <20b919730ee383d47e4c008f11652b02.jpg-image> 开始单文件上传<minio>
|
||||
15:20:03.253 [http-nio-9090-exec-3] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,74] - 预签名完成:http://47.103.114.59:9000/image/20b919730ee383d47e4c008f11652b02.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=olive%2F20241213%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241213T072003Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=c53c0fc6753a7c55e09b0536ac6141a907018141886e910e68d3b64c513ed1a6
|
||||
15:20:03.253 [http-nio-9090-exec-3] INFO c.m.utils.MinioUtils - [getUploadObjectUrl,75] - tip message: 单个文件上传、成功
|
||||
17:41:29.203 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,350] - HikariPool-1 - Shutdown initiated...
|
||||
17:41:29.207 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,352] - HikariPool-1 - Shutdown completed.
|
||||
17:48:11.753 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
17:48:11.771 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 135148 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
17:48:11.772 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
17:48:12.707 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
17:48:12.708 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
17:48:12.708 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
17:48:12.740 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
17:48:12.911 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat]
|
||||
17:50:02.517 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
17:50:02.530 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 124000 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
17:50:02.531 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
17:50:03.311 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
17:50:03.312 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
17:50:03.313 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
17:50:03.359 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
17:50:03.558 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat]
|
||||
17:51:31.914 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
17:51:31.928 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 135100 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
17:51:31.929 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
17:51:32.727 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
17:51:32.727 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
17:51:32.727 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
17:51:32.768 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
17:51:33.483 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
17:51:33.505 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.759 seconds (process running for 2.231)
|
||||
17:51:49.537 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
17:59:17.459 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
17:59:17.478 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 133680 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
17:59:17.480 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
17:59:18.595 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
17:59:18.596 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
17:59:18.596 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
17:59:18.636 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
17:59:19.482 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
17:59:19.517 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 2.289 seconds (process running for 2.888)
|
||||
18:00:01.217 [http-nio-9090-exec-6] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:00:36.955 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:00:36.971 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 124016 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:00:36.972 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:00:37.959 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:00:37.960 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:00:37.960 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:00:38.011 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:00:38.813 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:00:38.840 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 2.175 seconds (process running for 2.807)
|
||||
18:00:57.595 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:00:57.654 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,110] - HikariPool-1 - Starting...
|
||||
18:00:57.847 [http-nio-9090-exec-1] INFO c.z.h.p.HikariPool - [checkFailFast,565] - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@7d397f49
|
||||
18:00:57.848 [http-nio-9090-exec-1] INFO c.z.h.HikariDataSource - [getConnection,123] - HikariPool-1 - Start completed.
|
||||
18:08:07.136 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,350] - HikariPool-1 - Shutdown initiated...
|
||||
18:08:07.138 [SpringApplicationShutdownHook] INFO c.z.h.HikariDataSource - [close,352] - HikariPool-1 - Shutdown completed.
|
||||
18:08:13.108 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:08:13.123 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 129352 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:08:13.123 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:08:13.832 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:08:13.833 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:08:13.833 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:08:13.866 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:08:14.350 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:08:14.368 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.414 seconds (process running for 1.867)
|
||||
18:08:45.514 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:17:19.097 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:17:19.111 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 134044 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:17:19.112 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:17:20.068 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:17:20.068 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:17:20.068 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:17:20.133 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:17:20.854 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:17:20.870 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 2.005 seconds (process running for 2.953)
|
||||
18:27:28.415 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:33:58.150 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:33:58.163 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 2836 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:33:58.164 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:33:58.897 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:33:58.897 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:33:58.897 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:33:58.936 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:33:59.444 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:33:59.459 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.467 seconds (process running for 1.96)
|
||||
18:34:11.712 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:35:54.452 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:35:54.467 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 134524 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:35:54.467 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:35:55.200 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:35:55.201 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:35:55.201 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:35:55.238 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:35:55.754 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:35:55.773 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.485 seconds (process running for 2.018)
|
||||
18:43:33.044 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:44:29.614 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:44:29.630 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 119900 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:44:29.631 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:44:30.555 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:44:30.556 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:44:30.556 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:44:30.599 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:44:31.241 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:44:31.260 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.898 seconds (process running for 2.479)
|
||||
18:44:38.626 [http-nio-9090-exec-2] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
18:51:29.695 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
18:51:29.711 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 118064 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
18:51:29.712 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
18:51:30.440 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
18:51:30.441 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
18:51:30.441 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
18:51:30.479 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
18:51:30.993 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
18:51:31.013 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 1.488 seconds (process running for 2.024)
|
||||
18:51:38.918 [http-nio-9090-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet'
|
||||
10:44:08.609 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 8.0.0.Final
|
||||
10:44:08.637 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarting,51] - Starting MinioUploadFileApplication using Java 20.0.2.1 with PID 896320 (F:\Project\tutorial_repo\minio-admin\target\classes started by Administrator in F:\Project\tutorial_repo\minio-admin)
|
||||
10:44:08.638 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStartupProfileInfo,630] - No active profile set, falling back to 1 default profile: "default"
|
||||
10:44:10.496 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9090"]
|
||||
10:44:10.497 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat]
|
||||
10:44:10.497 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.5]
|
||||
10:44:10.548 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext
|
||||
10:44:11.589 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-9090"]
|
||||
10:44:11.610 [restartedMain] INFO c.m.MinioUploadFileApplication - [logStarted,57] - Started MinioUploadFileApplication in 3.291 seconds (process running for 4.179)
|
||||
|
@ -73,6 +73,17 @@
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.7.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
|
@ -26,7 +26,7 @@ public class WebAppConfigurer implements WebMvcConfigurer {
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowCredentials(true)
|
||||
.allowedOriginPatterns("*")
|
||||
.allowedOriginPatterns("http://localhost:*")
|
||||
.allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
|
||||
.allowedHeaders("*");
|
||||
}
|
||||
|
@ -0,0 +1,154 @@
|
||||
package com.mmg.controller;
|
||||
|
||||
import com.mmg.constant.BackendConstant;
|
||||
import com.mmg.model.po.Resource;
|
||||
import com.mmg.model.po.UploadFileMergeRequest;
|
||||
import com.mmg.service.AppConfigService;
|
||||
import com.mmg.service.ResourceService;
|
||||
import com.mmg.service.UploadService;
|
||||
import com.mmg.types.JsonResponse;
|
||||
import com.mmg.utils.HelperUtil;
|
||||
import com.mmg.utils.S3Util;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.util.HashMap;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/minio/upload")
|
||||
public class UploadController {
|
||||
|
||||
|
||||
@Autowired private UploadService uploadService;
|
||||
|
||||
@Autowired private AppConfigService appConfigService;
|
||||
|
||||
@Autowired private ResourceService resourceService;
|
||||
|
||||
@PostMapping("/minio")
|
||||
|
||||
public JsonResponse uploadMinio(
|
||||
@RequestParam HashMap<String, Object> params, MultipartFile file)
|
||||
throws Exception {
|
||||
String categoryIds = MapUtils.getString(params, "category_ids");
|
||||
|
||||
Resource res = uploadService.storeMinio(1, file, categoryIds);
|
||||
return JsonResponse.data(res);
|
||||
}
|
||||
|
||||
@GetMapping("/minio/upload-id")
|
||||
public JsonResponse minioUploadId(@RequestParam HashMap<String, Object> params) {
|
||||
String extension = MapUtils.getString(params, "extension");
|
||||
if (extension == null || extension.trim().isEmpty()) {
|
||||
return JsonResponse.error("extension参数为空");
|
||||
}
|
||||
String type = BackendConstant.RESOURCE_EXT_2_TYPE.get(extension.toLowerCase());
|
||||
if (type == null) {
|
||||
return JsonResponse.error("该格式文件不支持上传");
|
||||
}
|
||||
|
||||
S3Util s3Util = new S3Util(appConfigService.getS3Config());
|
||||
|
||||
String filename = HelperUtil.randomString(32) + "." + extension; // 文件名
|
||||
String path = BackendConstant.RESOURCE_TYPE_2_DIR.get(type) + filename; // 存储路径
|
||||
String uploadId = s3Util.uploadId(path);
|
||||
|
||||
HashMap<String, String> data = new HashMap<>();
|
||||
data.put("resource_type", type);
|
||||
data.put("upload_id", uploadId);
|
||||
data.put("filename", path);
|
||||
|
||||
return JsonResponse.data(data);
|
||||
}
|
||||
|
||||
@GetMapping("/minio/pre-sign-url")
|
||||
public JsonResponse minioPreSignUrl(@RequestParam HashMap<String, Object> params) {
|
||||
String uploadId = MapUtils.getString(params, "upload_id");
|
||||
Integer partNumber = MapUtils.getInteger(params, "part_number");
|
||||
String filename = MapUtils.getString(params, "filename");
|
||||
|
||||
S3Util s3Util = new S3Util(appConfigService.getS3Config());
|
||||
|
||||
String url = s3Util.generatePartUploadPreSignUrl(filename, partNumber + "", uploadId);
|
||||
|
||||
HashMap<String, String> data = new HashMap<>();
|
||||
data.put("url", url);
|
||||
|
||||
return JsonResponse.data(data);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/minio/merge-file")
|
||||
public JsonResponse minioMergeFile(@RequestBody @Validated UploadFileMergeRequest req)
|
||||
throws Exception {
|
||||
String type = BackendConstant.RESOURCE_EXT_2_TYPE.get(req.getExtension());
|
||||
if (type == null) {
|
||||
return JsonResponse.error("当前格式不支持上传");
|
||||
}
|
||||
String extension = req.getExtension();
|
||||
String originalFilename = req.getOriginalFilename().replaceAll("(?i)." + extension, "");
|
||||
|
||||
// 合并资源文件
|
||||
S3Util s3Util = new S3Util(appConfigService.getS3Config());
|
||||
String url = s3Util.merge(req.getFilename(), req.getUploadId());
|
||||
|
||||
// 资源素材保存
|
||||
|
||||
Resource videoResource =
|
||||
resourceService.create(
|
||||
1,
|
||||
req.getCategoryIds(),
|
||||
type,
|
||||
originalFilename,
|
||||
extension,
|
||||
req.getSize(),
|
||||
BackendConstant.STORAGE_DRIVER_MINIO,
|
||||
"",
|
||||
req.getFilename(),
|
||||
url);
|
||||
|
||||
// 视频资源特殊处理--视频封面资源
|
||||
if (BackendConstant.RESOURCE_TYPE_VIDEO.equals(type)) {
|
||||
// 视频封面素材保存
|
||||
Resource posterResource =
|
||||
uploadService.storeBase64Image(1, req.getPoster(), null);
|
||||
// 视频的封面素材改为[隐藏 && 属于视频的子素材]
|
||||
resourceService.changeParentId(posterResource.getId(), videoResource.getId());
|
||||
// 视频信息
|
||||
resourceService.storeResourceVideo(
|
||||
videoResource.getId(), req.getDuration(), posterResource.getUrl());
|
||||
}
|
||||
|
||||
HashMap<String, Object> data = new HashMap<>();
|
||||
data.put("url", url);
|
||||
|
||||
return JsonResponse.data(data);
|
||||
}
|
||||
|
||||
@GetMapping("/minio/merge")
|
||||
public JsonResponse minioMerge(@RequestParam HashMap<String, Object> params) {
|
||||
String filename = MapUtils.getString(params, "filename");
|
||||
String uploadId = MapUtils.getString(params, "upload_id");
|
||||
if (filename == null || filename.trim().isEmpty()) {
|
||||
return JsonResponse.error("filename必填");
|
||||
}
|
||||
if (uploadId == null || uploadId.trim().isEmpty()) {
|
||||
return JsonResponse.error("uploadId必填");
|
||||
}
|
||||
|
||||
S3Util s3Util = new S3Util(appConfigService.getS3Config());
|
||||
|
||||
String url = s3Util.merge(filename, uploadId);
|
||||
|
||||
HashMap<String, Object> data = new HashMap<>();
|
||||
data.put("url", url);
|
||||
|
||||
return JsonResponse.data(data);
|
||||
}
|
||||
}
|
7
minio-admin/src/main/java/com/mmg/model/po/Bctx.java
Normal file
7
minio-admin/src/main/java/com/mmg/model/po/Bctx.java
Normal file
@ -0,0 +1,7 @@
|
||||
package com.mmg.model.po;
|
||||
|
||||
public class Bctx{
|
||||
public static Integer getId() {
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.mmg.model.po;
|
||||
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class UploadFileMergeRequest {
|
||||
|
||||
private String filename;
|
||||
|
||||
@JsonProperty("upload_id")
|
||||
private String uploadId;
|
||||
|
||||
@JsonProperty("original_filename")
|
||||
private String originalFilename;
|
||||
|
||||
private Long size;
|
||||
|
||||
private Integer duration;
|
||||
|
||||
private String extension;
|
||||
|
||||
@JsonProperty("category_ids")
|
||||
private String categoryIds;
|
||||
|
||||
private String poster;
|
||||
}
|
Loading…
Reference in New Issue
Block a user