log/ali oss
This commit is contained in:
@@ -115,6 +115,14 @@ public class ControllerLogAspect {
|
|||||||
} else {
|
} else {
|
||||||
if (result != null && result.getClass().equals(byte[].class)) {
|
if (result != null && result.getClass().equals(byte[].class)) {
|
||||||
operationLog.setResult("byte数组。。。");
|
operationLog.setResult("byte数组。。。");
|
||||||
|
} else if (result instanceof AlitaResult){
|
||||||
|
if (((AlitaResult<?>) result).getData() instanceof Page){
|
||||||
|
operationLog.setResult("分页结果。。。");
|
||||||
|
} else if (((AlitaResult<?>) result).getData() instanceof List){
|
||||||
|
operationLog.setResult("List结果。。。");
|
||||||
|
} else {
|
||||||
|
operationLog.setResult(parseString(result));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
operationLog.setResult(parseString(result));
|
operationLog.setResult(parseString(result));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.newyetai.component.file.config;
|
||||||
|
|
||||||
|
import com.newyetai.common.util.EnvironmentUtils;
|
||||||
|
import com.newyetai.component.file.constant.FileStorageEnum;
|
||||||
|
import com.newyetai.component.file.service.storage.AliFileStorage;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class FileConfiguration {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileProperties fileProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param environmentUtils 使其优先注入
|
||||||
|
* @return
|
||||||
|
* @author sr on 2022-03-01
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnProperty(name = "file.storage.type", havingValue = FileStorageEnum.ALI_NAME)
|
||||||
|
public AliFileStorage aliFileStorage(EnvironmentUtils environmentUtils) {
|
||||||
|
return new AliFileStorage(fileProperties);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user