xiejun
2024-11-01 80b6cbfc9c861469146318d0b3dd5f8b8b525b8a
Source/BladeX-Tool/blade-core-boot/src/main/java/org/springblade/core/boot/props/BladeFileProperties.java
对比新文件
@@ -0,0 +1,76 @@
package org.springblade.core.boot.props;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
 * BladeFileProperties
 *
 * @author Chill
 */
@Getter
@Setter
@ConfigurationProperties("blade.file")
public class BladeFileProperties {
   /**
    * 杩滅▼涓婁紶妯″紡
    */
   private boolean remoteMode = false;
   /**
    * 澶栫綉鍦板潃
    */
   private String uploadDomain = "http://127.0.0.1:8999";
   /**
    * 涓婁紶涓嬭浇璺緞(鐗╃悊璺緞)
    */
   private String remotePath = System.getProperty("user.dir") + "/target/blade";
   /**
    * 涓婁紶璺緞(鐩稿璺緞)
    */
   private String uploadPath = "/upload";
   /**
    * 涓嬭浇璺緞
    */
   private String downloadPath = "/download";
   /**
    * 鍥剧墖鍘嬬缉
    */
   private Boolean compress = false;
   /**
    * 鍥剧墖鍘嬬缉姣斾緥
    */
   private Double compressScale = 2.00;
   /**
    * 鍥剧墖缂╂斁閫夋嫨:true鏀惧ぇ;false缂╁皬
    */
   private Boolean compressFlag = false;
   /**
    * 椤圭洰鐗╃悊璺緞
    */
   private String realPath = System.getProperty("user.dir");
   /**
    * 椤圭洰鐩稿璺緞
    */
   private String contextPath = "/";
   public String getUploadRealPath() {
      return (remoteMode ? remotePath : realPath) + uploadPath;
   }
   public String getUploadCtxPath() {
      return contextPath + uploadPath;
   }
}