首页>代码>SpringBoot集成Thumbnailator压缩图片>/springboot-thumbnailator/src/main/java/com/simon/springbootthumbnailator/config/ImgZipConfig.java
package com.simon.springbootthumbnailator.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* 图片配置参数
*
* @author Simon
*/
@Component
public class ImgZipConfig {
//图片默认上传服务器地址
public static String imagePath;
//图片压缩比例
public static Double defaultScale;
//图片上传默认项目名称
public static String name;
@Value("${imgzip.img.path}")
public void setImagePath(String $imagePath) {
imagePath = $imagePath;
}
@Value("${imgzip.img.default.scale}")
public void setDefaultScale(Double $defaultScale) {
defaultScale = $defaultScale;
}
@Value("${imgzip.img.name}")
public void setName(String $name) {
name = $name;
}
}

最近下载
最近浏览