增加存储模块,将minio工具类迁移到存储包
增加minio的通知功能,通过mqtt将通知入库
修复配置文件自定义字段标黄的问题
已添加18个文件
已重命名1个文件
已修改8个文件
| | |
| | | package com.ruoyi.app.position.controller; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | import com.ruoyi.app.position.service.IArdAppPositionService; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.storage.minio.utils.MinioUtils; |
| | | import com.ruoyi.rongcloud.service.RongCloudService; |
| | | import com.ruoyi.system.domain.SysUserOnline; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserOnlineService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | |
| | | @ApiOperation("ä¸ä¼ æä»¶") |
| | | public AjaxResult uploadFile(MultipartFile file,String type) |
| | | { |
| | | String url = MinioUtils.putObjectAndGetUrl("app",type, file); |
| | | String url = MinioUtils.putObjectAndGetUrl("app1",type, file); |
| | | return AjaxResult.success(url); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.device.hiksdk.util.hikSdkUtil.HCNetSDK; |
| | | import com.ruoyi.device.hiksdk.service.IHikClientService; |
| | | import com.ruoyi.device.hiksdk.util.hikSdkUtil.LoginResultCallBack; |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.storage.minio.utils.MinioUtils; |
| | | import com.sun.jna.Native; |
| | | import com.sun.jna.Platform; |
| | | import com.sun.jna.Pointer; |
| | |
| | | |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.device.hiksdk.config.MinioClientSingleton; |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.rongcloud.service.RongCloudService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.storage.minio.domain.StorageMinioEvent; |
| | | import com.ruoyi.storage.minio.service.IStorageMinioEventService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * åå¨äºä»¶Controller |
| | | * |
| | | * @author ard |
| | | * @date 2023-08-05 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/minio/event") |
| | | public class StorageMinioEventController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IStorageMinioEventService storageMinioEventService; |
| | | |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('minio:event:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(StorageMinioEvent storageMinioEvent) |
| | | { |
| | | startPage(); |
| | | List<StorageMinioEvent> list = storageMinioEventService.selectStorageMinioEventList(storageMinioEvent); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºåå¨äºä»¶å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('minio:event:export')") |
| | | @Log(title = "åå¨äºä»¶", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, StorageMinioEvent storageMinioEvent) |
| | | { |
| | | List<StorageMinioEvent> list = storageMinioEventService.selectStorageMinioEventList(storageMinioEvent); |
| | | ExcelUtil<StorageMinioEvent> util = new ExcelUtil<StorageMinioEvent>(StorageMinioEvent.class); |
| | | util.exportExcel(response, list, "åå¨äºä»¶æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·ååå¨äºä»¶è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('minio:event:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | | { |
| | | return success(storageMinioEventService.selectStorageMinioEventById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åå¨äºä»¶ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('minio:event:add')") |
| | | @Log(title = "åå¨äºä»¶", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody StorageMinioEvent storageMinioEvent) |
| | | { |
| | | return toAjax(storageMinioEventService.insertStorageMinioEvent(storageMinioEvent)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åå¨äºä»¶ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('minio:event:edit')") |
| | | @Log(title = "åå¨äºä»¶", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody StorageMinioEvent storageMinioEvent) |
| | | { |
| | | return toAjax(storageMinioEventService.updateStorageMinioEvent(storageMinioEvent)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åå¨äºä»¶ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('minio:event:remove')") |
| | | @Log(title = "åå¨äºä»¶", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |
| | | { |
| | | return toAjax(storageMinioEventService.deleteStorageMinioEventByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * åå¨äºä»¶å¯¹è±¡ storage_minio_event |
| | | * |
| | | * @author ard |
| | | * @date 2023-08-05 |
| | | */ |
| | | public class StorageMinioEvent extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private String id; |
| | | |
| | | /** äºä»¶ç±»å */ |
| | | @Excel(name = "äºä»¶ç±»å") |
| | | private String eventType; |
| | | |
| | | /** æ¡¶åç§° */ |
| | | @Excel(name = "æ¡¶åç§°") |
| | | private String bucketName; |
| | | |
| | | /** äºä»¶æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "äºä»¶æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date eventTime; |
| | | |
| | | /** 请æ±ä¸»æº */ |
| | | @Excel(name = "请æ±ä¸»æº") |
| | | private String host; |
| | | |
| | | /** 请æ±ç¨æ· */ |
| | | @Excel(name = "请æ±ç¨æ·") |
| | | private String userName; |
| | | |
| | | /** 请æ±å°å */ |
| | | @Excel(name = "请æ±å°å") |
| | | private String endpoint; |
| | | |
| | | /** 对象åç§° */ |
| | | @Excel(name = "对象åç§°") |
| | | private String objectName; |
| | | |
| | | /** 对象类å */ |
| | | @Excel(name = "对象类å") |
| | | private String objectType; |
| | | |
| | | /** å¯¹è±¡å¤§å° */ |
| | | @Excel(name = "对象大å°") |
| | | private int objectSize; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setEventType(String eventType) |
| | | { |
| | | this.eventType = eventType; |
| | | } |
| | | |
| | | public String getEventType() |
| | | { |
| | | return eventType; |
| | | } |
| | | public void setBucketName(String bucketName) |
| | | { |
| | | this.bucketName = bucketName; |
| | | } |
| | | |
| | | public String getBucketName() |
| | | { |
| | | return bucketName; |
| | | } |
| | | public void setEventTime(Date eventTime) |
| | | { |
| | | this.eventTime = eventTime; |
| | | } |
| | | |
| | | public Date getEventTime() |
| | | { |
| | | return eventTime; |
| | | } |
| | | public void setHost(String host) |
| | | { |
| | | this.host = host; |
| | | } |
| | | |
| | | public String getHost() |
| | | { |
| | | return host; |
| | | } |
| | | public void setUserName(String userName) |
| | | { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | public String getUserName() |
| | | { |
| | | return userName; |
| | | } |
| | | public void setEndpoint(String endpoint) |
| | | { |
| | | this.endpoint = endpoint; |
| | | } |
| | | |
| | | public String getEndpoint() |
| | | { |
| | | return endpoint; |
| | | } |
| | | public void setObjectName(String objectName) |
| | | { |
| | | this.objectName = objectName; |
| | | } |
| | | |
| | | public String getObjectName() |
| | | { |
| | | return objectName; |
| | | } |
| | | public void setObjectType(String objectType) |
| | | { |
| | | this.objectType = objectType; |
| | | } |
| | | |
| | | public String getObjectType() |
| | | { |
| | | return objectType; |
| | | } |
| | | public void setObjectSize(int objectSize) |
| | | { |
| | | this.objectSize = objectSize; |
| | | } |
| | | |
| | | public int getObjectSize() |
| | | { |
| | | return objectSize; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("eventType", getEventType()) |
| | | .append("bucketName", getBucketName()) |
| | | .append("eventTime", getEventTime()) |
| | | .append("host", getHost()) |
| | | .append("userName", getUserName()) |
| | | .append("endpoint", getEndpoint()) |
| | | .append("objectName", getObjectName()) |
| | | .append("objectType", getObjectType()) |
| | | .append("objectSize", getObjectSize()) |
| | | .append("createTime", getCreateTime()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class Bucket { |
| | | private String name; |
| | | @JsonProperty("ownerIdentity") |
| | | private Owneridentity owneridentity; |
| | | private String arn; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | import java.util.List; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class JsonsRootBean { |
| | | |
| | | @JsonProperty("EventName") |
| | | private String eventname; |
| | | @JsonProperty("Key") |
| | | private String key; |
| | | @JsonProperty("Records") |
| | | private List<Records> records; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class Owneridentity { |
| | | |
| | | @JsonProperty("principalId") |
| | | private String principalid; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class Records { |
| | | |
| | | // private String eventVersion; |
| | | // private String eventSource; |
| | | // private String awsRegion; |
| | | |
| | | private Date eventTime; |
| | | private String eventName; |
| | | // private com.ruoyi.storage.minio.domain.jsonbean.userIdentity userIdentity; |
| | | private Requestparameters requestParameters; |
| | | private ResponseElements responseElements; |
| | | private S3 s3; |
| | | @JsonProperty("source") |
| | | private mSource source; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class Requestparameters { |
| | | |
| | | @JsonProperty("principalId") |
| | | private String principalid; |
| | | private String region; |
| | | @JsonProperty("sourceIPAddress") |
| | | private String sourceipaddress; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class ResponseElements { |
| | | |
| | | private String contentLength; |
| | | private String xAmzId2; |
| | | private String xAmzRequestId; |
| | | private String xMinioDeploymentId; |
| | | @JsonProperty("x-minio-origin-endpoint") |
| | | private String xMinioOriginEndpoint; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class S3 { |
| | | |
| | | // @JsonProperty("s3SchemaVersion") |
| | | // private String s3schemaversion; |
| | | // @JsonProperty("configurationId") |
| | | // private String configurationid; |
| | | private Bucket bucket; |
| | | @JsonProperty("object") |
| | | private mObject mObject; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class Usermetadata { |
| | | private String contentType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class mObject { |
| | | |
| | | private String key; |
| | | private int size; |
| | | private String eTag; |
| | | private String contentType; |
| | | private Usermetadata userMetadata; |
| | | private String sequencer; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import lombok.Data; |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class mSource { |
| | | private String host; |
| | | // private String port; |
| | | // @JsonProperty("userAgent") |
| | | // private Date useragent; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.domain.jsonbean; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Auto-generated: 2023-08-05 11:37:3 |
| | | * |
| | | * @author www.jsons.cn |
| | | * @website http://www.jsons.cn/json2java/ |
| | | */ |
| | | @Data |
| | | public class userIdentity { |
| | | |
| | | private String principalId; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.storage.minio.domain.StorageMinioEvent; |
| | | |
| | | /** |
| | | * åå¨äºä»¶Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2023-08-05 |
| | | */ |
| | | public interface StorageMinioEventMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶ |
| | | * |
| | | * @param id åå¨äºä»¶ä¸»é® |
| | | * @return åå¨äºä»¶ |
| | | */ |
| | | public StorageMinioEvent selectStorageMinioEventById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶å表 |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return åå¨äºä»¶éå |
| | | */ |
| | | public List<StorageMinioEvent> selectStorageMinioEventList(StorageMinioEvent storageMinioEvent); |
| | | |
| | | /** |
| | | * æ°å¢åå¨äºä»¶ |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertStorageMinioEvent(StorageMinioEvent storageMinioEvent); |
| | | |
| | | /** |
| | | * ä¿®æ¹åå¨äºä»¶ |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateStorageMinioEvent(StorageMinioEvent storageMinioEvent); |
| | | |
| | | /** |
| | | * å é¤åå¨äºä»¶ |
| | | * |
| | | * @param id åå¨äºä»¶ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteStorageMinioEventById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤åå¨äºä»¶ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteStorageMinioEventByIds(String[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.storage.minio.domain.StorageMinioEvent; |
| | | |
| | | /** |
| | | * åå¨äºä»¶Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2023-08-05 |
| | | */ |
| | | public interface IStorageMinioEventService |
| | | { |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶ |
| | | * |
| | | * @param id åå¨äºä»¶ä¸»é® |
| | | * @return åå¨äºä»¶ |
| | | */ |
| | | public StorageMinioEvent selectStorageMinioEventById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶å表 |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return åå¨äºä»¶éå |
| | | */ |
| | | public List<StorageMinioEvent> selectStorageMinioEventList(StorageMinioEvent storageMinioEvent); |
| | | |
| | | /** |
| | | * æ°å¢åå¨äºä»¶ |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertStorageMinioEvent(StorageMinioEvent storageMinioEvent); |
| | | |
| | | /** |
| | | * ä¿®æ¹åå¨äºä»¶ |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateStorageMinioEvent(StorageMinioEvent storageMinioEvent); |
| | | |
| | | /** |
| | | * æ¹éå é¤åå¨äºä»¶ |
| | | * |
| | | * @param ids éè¦å é¤çåå¨äºä»¶ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteStorageMinioEventByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤åå¨äºä»¶ä¿¡æ¯ |
| | | * |
| | | * @param id åå¨äºä»¶ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteStorageMinioEventById(String id); |
| | | /** |
| | | * è§£æminioäºä»¶ |
| | | * |
| | | * @param message åå¨äºä»¶æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public void parseStorageMinioEvent(String message); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.storage.minio.service.impl; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.net.URLEncoder; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.storage.minio.domain.jsonbean.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.storage.minio.mapper.StorageMinioEventMapper; |
| | | import com.ruoyi.storage.minio.domain.StorageMinioEvent; |
| | | import com.ruoyi.storage.minio.service.IStorageMinioEventService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * åå¨äºä»¶Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2023-08-05 |
| | | */ |
| | | @Service |
| | | @Slf4j(topic = "minio") |
| | | public class StorageMinioEventServiceImpl implements IStorageMinioEventService { |
| | | @Resource |
| | | private StorageMinioEventMapper storageMinioEventMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶ |
| | | * |
| | | * @param id åå¨äºä»¶ä¸»é® |
| | | * @return åå¨äºä»¶ |
| | | */ |
| | | @Override |
| | | public StorageMinioEvent selectStorageMinioEventById(String id) { |
| | | return storageMinioEventMapper.selectStorageMinioEventById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åå¨äºä»¶å表 |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return åå¨äºä»¶ |
| | | */ |
| | | @Override |
| | | public List<StorageMinioEvent> selectStorageMinioEventList(StorageMinioEvent storageMinioEvent) { |
| | | return storageMinioEventMapper.selectStorageMinioEventList(storageMinioEvent); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åå¨äºä»¶ |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertStorageMinioEvent(StorageMinioEvent storageMinioEvent) { |
| | | storageMinioEvent.setId(IdUtils.simpleUUID()); |
| | | storageMinioEvent.setCreateTime(DateUtils.getNowDate()); |
| | | return storageMinioEventMapper.insertStorageMinioEvent(storageMinioEvent); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åå¨äºä»¶ |
| | | * |
| | | * @param storageMinioEvent åå¨äºä»¶ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateStorageMinioEvent(StorageMinioEvent storageMinioEvent) { |
| | | return storageMinioEventMapper.updateStorageMinioEvent(storageMinioEvent); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤åå¨äºä»¶ |
| | | * |
| | | * @param ids éè¦å é¤çåå¨äºä»¶ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteStorageMinioEventByIds(String[] ids) { |
| | | return storageMinioEventMapper.deleteStorageMinioEventByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åå¨äºä»¶ä¿¡æ¯ |
| | | * |
| | | * @param id åå¨äºä»¶ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteStorageMinioEventById(String id) { |
| | | return storageMinioEventMapper.deleteStorageMinioEventById(id); |
| | | } |
| | | |
| | | @Async |
| | | @Override |
| | | public void parseStorageMinioEvent(String message) { |
| | | JsonsRootBean jsonsRootBean = JSONObject.parseObject(message, JsonsRootBean.class); |
| | | if (jsonsRootBean != null) { |
| | | Records records = jsonsRootBean.getRecords().get(0); |
| | | StorageMinioEvent storageMinioEvent = new StorageMinioEvent(); |
| | | storageMinioEvent.setEventTime(records.getEventTime()); |
| | | storageMinioEvent.setEventType(records.getEventName()); |
| | | storageMinioEvent.setBucketName(records.getS3().getBucket().getName()); |
| | | String encode = null; |
| | | try { |
| | | encode = URLDecoder.decode(records.getS3().getMObject().getKey(), "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | storageMinioEvent.setObjectName(encode); |
| | | storageMinioEvent.setObjectSize(records.getS3().getMObject().getSize()); |
| | | storageMinioEvent.setObjectType(records.getS3().getMObject().getContentType()); |
| | | storageMinioEvent.setHost(records.getSource().getHost()); |
| | | storageMinioEvent.setEndpoint(records.getResponseElements().getXMinioOriginEndpoint()); |
| | | storageMinioEvent.setUserName(records.getRequestParameters().getPrincipalid()); |
| | | |
| | | int i = insertStorageMinioEvent(storageMinioEvent); |
| | | if(i>0) |
| | | { |
| | | log.debug("minioæä½æ¥å¿å
¥åºæå!ã"+storageMinioEvent.getEventType()+"ã"); |
| | | } |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó ard-work/src/main/java/com/ruoyi/device/hiksdk/util/minio/MinioUtils.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.device.hiksdk.util.minio; |
| | | package com.ruoyi.storage.minio.utils; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.device.hiksdk.config.MinioClientSingleton; |
| | | import io.minio.*; |
| | | import io.minio.http.Method; |
| | | import io.minio.messages.Bucket; |
| | | import io.minio.messages.DeleteError; |
| | | import io.minio.messages.DeleteObject; |
| | | import io.minio.messages.Item; |
| | | import io.minio.messages.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public static boolean exitsBucket(String bucketName) { |
| | | boolean found = false; |
| | | try { |
| | | if(StringUtils.isEmpty(bucketName)) |
| | | { |
| | | if (StringUtils.isEmpty(bucketName)) { |
| | | return false; |
| | | } |
| | | BucketExistsArgs bucketExistsArgs = BucketExistsArgs.builder().bucket(bucketName).build(); |
| | | found = MinioClientSingleton.getMinioClient().bucketExists(bucketExistsArgs); |
| | | |
| | | } catch (Exception ex) { |
| | | log.error("minioå¤ææ¡¶åå¨å¼å¸¸ï¼", ex.getMessage()); |
| | | } |
| | |
| | | */ |
| | | public static boolean createBucket(String bucketName) { |
| | | try { |
| | | if(StringUtils.isEmpty(bucketName)) |
| | | { |
| | | if (StringUtils.isEmpty(bucketName)) { |
| | | return false; |
| | | } |
| | | /*å建桶*/ |
| | |
| | | .bucket(bucketName) |
| | | .config(sb) |
| | | .build(); |
| | | /*设置éç¥mqtt*/ |
| | | //设置mqttä¸»é¢ |
| | | NotificationConfiguration config = new NotificationConfiguration(); |
| | | List<QueueConfiguration> queueConfigurations = new ArrayList<>(); |
| | | QueueConfiguration queueConfiguration = new QueueConfiguration(); |
| | | queueConfiguration.setQueue("arn:minio:sqs::_:mqtt"); |
| | | |
| | | //设置äºä»¶ |
| | | List<EventType> events=new ArrayList<>(); |
| | | events.add(EventType.OBJECT_REMOVED_ANY); |
| | | events.add(EventType.OBJECT_CREATED_ANY); |
| | | queueConfiguration.setEvents(events); |
| | | |
| | | queueConfigurations.add(queueConfiguration); |
| | | config.setQueueConfigurationList(queueConfigurations); |
| | | SetBucketNotificationArgs setBucketNotificationArgs = SetBucketNotificationArgs.builder() |
| | | .bucket(bucketName) |
| | | .config(config).build(); |
| | | MinioClientSingleton.getMinioClient().setBucketPolicy(setBucketPolicyArgs); |
| | | MinioClientSingleton.getMinioClient().setBucketNotification(setBucketNotificationArgs); |
| | | |
| | | return true; |
| | | } catch (Exception ex) { |
| | | log.error("minioå建桶å¼å¸¸ï¼", ex.getMessage()); |
| | |
| | | } catch (Exception ex) { |
| | | log.error("minioçæå¤±æurlå¼å¸¸", ex.getMessage()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | createBucket(bucketName); |
| | | } |
| | | return url; |
| | |
| | | * @ä¿®æ¹äººåå
¶å®ä¿¡æ¯ |
| | | */ |
| | | public static String putObjectAndGetUrl(String bucketName, MultipartFile file) { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | //夿æä»¶æ¯å¦ä¸ºç©º |
| | |
| | | * @ä¿®æ¹äººåå
¶å®ä¿¡æ¯ |
| | | */ |
| | | public static String putObjectAndGetUrl(String bucketName, String folder, MultipartFile file) { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | //夿æä»¶æ¯å¦ä¸ºç©º |
| | |
| | | */ |
| | | public static boolean uploadObject(String bucketName, String objectName, InputStream stream, long size, String contextType) { |
| | | try { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | PutObjectArgs putObjectArgs = PutObjectArgs.builder() |
| | |
| | | */ |
| | | public static boolean uploadObject(String bucketName, String objectName, File file, String contextType) { |
| | | try { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | FileInputStream fileInputStream = new FileInputStream(file); |
| | |
| | | */ |
| | | public static boolean uploadObject(String bucketName, String objectName, MultipartFile multipartFile, String contextType) { |
| | | try { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | |
| | | */ |
| | | public static boolean uploadObject(String bucketName, MultipartFile multipartFile, String contextType) { |
| | | try { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | if (multipartFile == null) { |
| | |
| | | */ |
| | | public static boolean uploadObject(String bucketName, String objectName, String localFilePathName, String contextType) { |
| | | try { |
| | | if(!exitsBucket(bucketName)) |
| | | { |
| | | if (!exitsBucket(bucketName)) { |
| | | createBucket(bucketName); |
| | | } |
| | | File file = new File(localFilePathName); |
| | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.utils.websocket.util.WebSocketUtils; |
| | | import com.ruoyi.device.hiksdk.config.MinioClientSingleton; |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.storage.minio.utils.MinioUtils; |
| | | import com.ruoyi.sy.domain.ArdSyUser; |
| | | import com.ruoyi.sy.gps31.PositionContainer; |
| | | import com.ruoyi.sy.mapper.ArdSyUserMapper; |
| | |
| | | |
| | | import com.ruoyi.alarm.global.service.impl.GlobalAlarmServiceImpl; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.storage.minio.service.IStorageMinioEventService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.eclipse.paho.client.mqttv3.*; |
| | | |
| | |
| | | public void messageArrived(String topic, MqttMessage message) { |
| | | try { |
| | | // subscribeåå¾å°çæ¶æ¯ä¼æ§è¡å°è¿éé¢ |
| | | log.info("æ¥æ¶æ¶æ¯ ã主é¢ã:" + topic + " ãå
容ã:" + new String(message.getPayload())); |
| | | log.debug("æ¥æ¶æ¶æ¯ ã主é¢ã:" + topic + " ãå
容ã:" + new String(message.getPayload())); |
| | | //è¿è¡ä¸å¡å¤ç(æ¥æ¶æ¥è¦æ°æ®) |
| | | GlobalAlarmServiceImpl globalAlarmService = SpringUtils.getBean(GlobalAlarmServiceImpl.class); |
| | | globalAlarmService.receiveAlarm(topic, new String(message.getPayload(), StandardCharsets.UTF_8)); |
| | | if (topic.equals("minioEvent")) |
| | | { |
| | | IStorageMinioEventService storageMinioEventService = SpringUtils.getBean(IStorageMinioEventService.class); |
| | | storageMinioEventService.parseStorageMinioEvent(new String(message.getPayload(), StandardCharsets.UTF_8)); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("å¤çmqttæ¶æ¯å¼å¸¸:" + e); |
| | | log.debug("å¤çmqttæ¶æ¯å¼å¸¸:" + e); |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.storage.minio.mapper.StorageMinioEventMapper"> |
| | | |
| | | <resultMap type="StorageMinioEvent" id="StorageMinioEventResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="eventType" column="event_type" /> |
| | | <result property="bucketName" column="bucket_name" /> |
| | | <result property="eventTime" column="event_time" /> |
| | | <result property="host" column="host" /> |
| | | <result property="userName" column="user_name" /> |
| | | <result property="endpoint" column="endpoint" /> |
| | | <result property="objectName" column="object_name" /> |
| | | <result property="objectType" column="object_type" /> |
| | | <result property="objectSize" column="object_size" /> |
| | | <result property="createTime" column="create_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectStorageMinioEventVo"> |
| | | select id, event_type, bucket_name, event_time, host, user_name, endpoint, object_name, object_type, object_size, create_time from storage_minio_event |
| | | </sql> |
| | | |
| | | <select id="selectStorageMinioEventList" parameterType="StorageMinioEvent" resultMap="StorageMinioEventResult"> |
| | | <include refid="selectStorageMinioEventVo"/> |
| | | <where> |
| | | <if test="eventType != null and eventType != ''"> and event_type = #{eventType}</if> |
| | | <if test="host != null and host != ''"> and host = #{host}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectStorageMinioEventById" parameterType="String" resultMap="StorageMinioEventResult"> |
| | | <include refid="selectStorageMinioEventVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertStorageMinioEvent" parameterType="StorageMinioEvent"> |
| | | insert into storage_minio_event |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="eventType != null">event_type,</if> |
| | | <if test="bucketName != null">bucket_name,</if> |
| | | <if test="eventTime != null">event_time,</if> |
| | | <if test="host != null">host,</if> |
| | | <if test="userName != null">user_name,</if> |
| | | <if test="endpoint != null">endpoint,</if> |
| | | <if test="objectName != null">object_name,</if> |
| | | <if test="objectType != null">object_type,</if> |
| | | <if test="objectSize != null">object_size,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="eventType != null">#{eventType},</if> |
| | | <if test="bucketName != null">#{bucketName},</if> |
| | | <if test="eventTime != null">#{eventTime},</if> |
| | | <if test="host != null">#{host},</if> |
| | | <if test="userName != null">#{userName},</if> |
| | | <if test="endpoint != null">#{endpoint},</if> |
| | | <if test="objectName != null">#{objectName},</if> |
| | | <if test="objectType != null">#{objectType},</if> |
| | | <if test="objectSize != null">#{objectSize},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateStorageMinioEvent" parameterType="StorageMinioEvent"> |
| | | update storage_minio_event |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="eventType != null">event_type = #{eventType},</if> |
| | | <if test="bucketName != null">bucket_name = #{bucketName},</if> |
| | | <if test="eventTime != null">event_time = #{eventTime},</if> |
| | | <if test="host != null">host = #{host},</if> |
| | | <if test="userName != null">user_name = #{userName},</if> |
| | | <if test="endpoint != null">endpoint = #{endpoint},</if> |
| | | <if test="objectName != null">object_name = #{objectName},</if> |
| | | <if test="objectType != null">object_type = #{objectType},</if> |
| | | <if test="objectSize != null">object_size = #{objectSize},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteStorageMinioEventById" parameterType="String"> |
| | | delete from storage_minio_event where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteStorageMinioEventByIds" parameterType="String"> |
| | | delete from storage_minio_event where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | { |
| | | public static void main(String[] args) |
| | | { |
| | | System.setProperty("spring.devtools.restart.enabled", "false");//å
³éçé¨ç½² |
| | | //System.setProperty("spring.devtools.restart.enabled", "false");//å
³éçé¨ç½² |
| | | SpringApplication.run(RuoYiApplication.class, args); |
| | | System.out.println("(â¥â â¿â )ï¾ï¾ å®çè¾¾4.0å¹³å°å¯å¨æå á(´ڡ`á)ï¾ \n" + |
| | | " ___ ___ \n" + |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "properties": [ |
| | | { |
| | | "name": "webrtc.enabled", |
| | | "type": "java.lang.String", |
| | | "description": "Description for webrtc.enabled." |
| | | }, |
| | | { |
| | | "name": "webrtc.host", |
| | | "type": "java.lang.String", |
| | | "description": "Description for webrtc.host." |
| | | }, |
| | | { |
| | | "name": "minio.enabled", |
| | | "type": "java.lang.String", |
| | | "description": "Description for minio.enabled." |
| | | }, |
| | | { |
| | | "name": "minio.endpoint", |
| | | "type": "java.lang.String", |
| | | "description": "Description for minio.endpoint." |
| | | }, |
| | | { |
| | | "name": "minio.accessKey", |
| | | "type": "java.lang.String", |
| | | "description": "Description for minio.accessKey." |
| | | }, |
| | | { |
| | | "name": "minio.secretKey", |
| | | "type": "java.lang.String", |
| | | "description": "Description for minio.secretKey." |
| | | }, |
| | | { |
| | | "name": "minio.path", |
| | | "type": "java.lang.String", |
| | | "description": "Description for minio.path." |
| | | }, |
| | | { |
| | | "name": "mediamtx.enabled", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mediamtx.enabled." |
| | | }, |
| | | { |
| | | "name": "mediamtx.host", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mediamtx.host." |
| | | }, |
| | | { |
| | | "name": "mqtt.host", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.host." |
| | | }, |
| | | { |
| | | "name": "mqtt.clientId", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.clientId." |
| | | }, |
| | | { |
| | | "name": "mqtt.username", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.username." |
| | | }, |
| | | { |
| | | "name": "mqtt.password", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.password." |
| | | }, |
| | | { |
| | | "name": "mqtt.topic", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.topic." |
| | | }, |
| | | { |
| | | "name": "mqtt.timeout", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.timeout." |
| | | }, |
| | | { |
| | | "name": "mqtt.keepalive", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.keepalive." |
| | | }, |
| | | { |
| | | "name": "mqtt.enabled", |
| | | "type": "java.lang.String", |
| | | "description": "Description for mqtt.enabled." |
| | | }, |
| | | { |
| | | "name": "ThreadPoolTask.corePoolSize", |
| | | "type": "java.lang.String", |
| | | "description": "Description for ThreadPoolTask.corePoolSize." |
| | | }, |
| | | { |
| | | "name": "ThreadPoolTask.maxPoolSize", |
| | | "type": "java.lang.String", |
| | | "description": "Description for ThreadPoolTask.maxPoolSize." |
| | | }, |
| | | { |
| | | "name": "ThreadPoolTask.keepAliveSeconds", |
| | | "type": "java.lang.String", |
| | | "description": "Description for ThreadPoolTask.keepAliveSeconds." |
| | | }, |
| | | { |
| | | "name": "ThreadPoolTask.queueCapacity", |
| | | "type": "java.lang.String", |
| | | "description": "Description for ThreadPoolTask.queueCapacity." |
| | | } |
| | | ] } |
| | |
| | | package com.ruoyi.quartz.task; |
| | | |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.storage.minio.utils.MinioUtils; |
| | | import io.minio.Result; |
| | | import io.minio.messages.Item; |
| | | import lombok.extern.slf4j.Slf4j; |