|
@@ -2,7 +2,7 @@ package com.qmth.boot.api.controller;
|
|
|
|
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
import com.qmth.boot.api.annotation.Aac;
|
|
import com.qmth.boot.core.exception.ParameterException;
|
|
import com.qmth.boot.core.exception.ParameterException;
|
|
-import com.qmth.boot.core.fss.service.FileService;
|
|
|
|
|
|
+import com.qmth.boot.core.fss.service.FileStoreService;
|
|
import com.qmth.boot.core.fss.store.FileStore;
|
|
import com.qmth.boot.core.fss.store.FileStore;
|
|
import com.qmth.boot.core.fss.utils.FssUtils;
|
|
import com.qmth.boot.core.fss.utils.FssUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -24,7 +24,7 @@ import javax.validation.constraints.NotBlank;
|
|
public class FssController {
|
|
public class FssController {
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
- private FileService fileService;
|
|
|
|
|
|
+ private FileStoreService fileStoreService;
|
|
|
|
|
|
@GetMapping("/**")
|
|
@GetMapping("/**")
|
|
public ResponseEntity<InputStreamResource> get(HttpServletRequest request,
|
|
public ResponseEntity<InputStreamResource> get(HttpServletRequest request,
|
|
@@ -32,7 +32,7 @@ public class FssController {
|
|
@RequestParam(name = FssUtils.INNER_ENDPOINT_PARAM_EXPIRE_TIME) @Min(0) Long expireTime,
|
|
@RequestParam(name = FssUtils.INNER_ENDPOINT_PARAM_EXPIRE_TIME) @Min(0) Long expireTime,
|
|
@RequestParam(name = FssUtils.INNER_ENDPOINT_PARAM_SIGNATURE) @NotBlank String signature) throws Exception {
|
|
@RequestParam(name = FssUtils.INNER_ENDPOINT_PARAM_SIGNATURE) @NotBlank String signature) throws Exception {
|
|
String path = request.getServletPath().substring(FssUtils.INNER_ENDPOINT_PREFIX.length() + 1);
|
|
String path = request.getServletPath().substring(FssUtils.INNER_ENDPOINT_PREFIX.length() + 1);
|
|
- FileStore fileStore = fileService.getFileStore(bucket);
|
|
|
|
|
|
+ FileStore fileStore = fileStoreService.getFileStore(bucket);
|
|
if (fileStore == null) {
|
|
if (fileStore == null) {
|
|
throw new ParameterException("bucket not exists: " + bucket);
|
|
throw new ParameterException("bucket not exists: " + bucket);
|
|
}
|
|
}
|