targetAddr
来源:4-3 Thumbnailator图片处理和封装Util
大尾鲈鳗100
2020-04-26
targetAddr是指什么
写回答
2回答
-
翔仔
2020-04-27
文件要保存到的目标路径
00 -
大尾鲈鳗100
提问者
2020-04-27
private void addShopImg(Shop shop, ImageHolder thumbnail) { // 获取shop的图片目录的相对值路径 String dest = PathUtil.getShopImagePath(shop.getShopId()); String shopImgAddr = ImageUtil.generateThumbnail(thumbnail, dest); shop.setShopImg(shopImgAddr); } //相对子路径,获取店铺的图片存储的子路径 public static String getShopImagePath(long shopId) { String imagePath = shopPath+ shopId + "/"; return imagePath.replace("/", seperator); } @Value("${shop.relevant.path}") public void setShopPath(String shopPath) { PathUtil.shopPath = shopPath; } application.properties里面的配置 shop.relevant.path=/upload/images/item/shop/ 所以 dest就是targetAddr dest=/upload/images/item/shop/+shopId + "/";
00
相似问题
老师,这个路径是怎么识别的
回答 1
Util类
回答 1