新增zookeeper-starter实现zookeeper分布式锁
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.central.file.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.central.common.constant.CommonConstant;
|
||||
import com.central.file.model.FileInfo;
|
||||
import com.central.oss.model.ObjectInfo;
|
||||
import com.central.oss.properties.FileServerProperties;
|
||||
@@ -24,8 +25,6 @@ import java.io.OutputStream;
|
||||
@Service
|
||||
@ConditionalOnProperty(prefix = com.central.oss.properties.FileServerProperties.PREFIX, name = "type", havingValue = FileServerProperties.TYPE_S3)
|
||||
public class S3Service extends AbstractIFileService {
|
||||
private static final String PATH_SPLIT = "/";
|
||||
|
||||
@Resource
|
||||
private S3Template s3Template;
|
||||
|
||||
@@ -64,7 +63,7 @@ public class S3Service extends AbstractIFileService {
|
||||
private S3Object parsePath(String path) {
|
||||
S3Object s3Object = new S3Object();
|
||||
if (StrUtil.isNotEmpty(path)) {
|
||||
int splitIndex = path.lastIndexOf(PATH_SPLIT);
|
||||
int splitIndex = path.lastIndexOf(CommonConstant.PATH_SPLIT);
|
||||
if (splitIndex != -1) {
|
||||
s3Object.bucketName = path.substring(0, splitIndex);
|
||||
s3Object.objectName = path.substring(splitIndex + 1);
|
||||
|
||||
Reference in New Issue
Block a user