|
@@ -1,10 +1,17 @@
|
|
|
package com.fdkankan.fyun.local.constant;
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+
|
|
|
public class LocalConstants {
|
|
|
/**
|
|
|
* oss文件上传命令
|
|
|
* 第一个参数是oss路径,要包含bucket名称
|
|
|
* 第二个参数是本地文件路径
|
|
|
*/
|
|
|
- public static final String BASE_PATH = "/oss/";
|
|
|
+ public static String BASE_PATH = "/oss/";
|
|
|
+
|
|
|
+ @Value("${fyun.local.filepath:/oss/}")
|
|
|
+ public void setBasePath(String basePath){
|
|
|
+ LocalConstants.BASE_PATH = basePath;
|
|
|
+ }
|
|
|
}
|