shiqian 4 роки тому
батько
коміт
de9700eb1a

+ 8 - 1
boman-modules/boman-file/src/main/java/com/boman/file/service/LocalSysFileServiceImpl.java

@@ -15,6 +15,8 @@ import com.boman.domain.dto.ImportExcelDto;
 import com.boman.file.utils.FileUploadUtils;
 import com.boman.file.utils.FileUploadUtils;
 import com.boman.web.core.api.RemoteObjService;
 import com.boman.web.core.api.RemoteObjService;
 import org.apache.commons.lang3.BooleanUtils;
 import org.apache.commons.lang3.BooleanUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.context.annotation.Primary;
 import org.springframework.context.annotation.Primary;
@@ -39,6 +41,8 @@ import static com.boman.common.core.utils.obj.ObjectUtils.map;
 public class LocalSysFileServiceImpl implements ISysFileService
 public class LocalSysFileServiceImpl implements ISysFileService
 {
 {
 
 
+    private static final Logger LOGGER = LoggerFactory.getLogger(LocalSysFileServiceImpl.class);
+
     @Resource
     @Resource
     private RemoteObjService remoteObjService;
     private RemoteObjService remoteObjService;
     @Resource
     @Resource
@@ -74,6 +78,7 @@ public class LocalSysFileServiceImpl implements ISysFileService
     {
     {
         String name = FileUploadUtils.upload(localFilePath, file);
         String name = FileUploadUtils.upload(localFilePath, file);
         String url = domain + localFilePrefix + name;
         String url = domain + localFilePrefix + name;
+        LOGGER.info("上传的路径为: {}", url);
         return url;
         return url;
     }
     }
 
 
@@ -87,7 +92,9 @@ public class LocalSysFileServiceImpl implements ISysFileService
     public String uploadFileBase64(String base64) throws IOException {
     public String uploadFileBase64(String base64) throws IOException {
         MultipartFile multipartFile = FileUploadUtils.base64ToMultipart(base64);
         MultipartFile multipartFile = FileUploadUtils.base64ToMultipart(base64);
         String name = FileUploadUtils.upload(localFilePath, multipartFile);
         String name = FileUploadUtils.upload(localFilePath, multipartFile);
-        return domain + localFilePrefix + name;
+        String path = domain + localFilePrefix + name;
+        LOGGER.info("上传的路径为: {}", path);
+        return path;
     }
     }
 
 
     /**
     /**