Browse Source

// add bank

release_toaliyun_real
xhxu 3 years ago
parent
commit
b1248f1b81
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      mallinkBApi/src/main/java/com/iformall/utils/ImgYwsqhUtil.java

+ 4
- 1
mallinkBApi/src/main/java/com/iformall/utils/ImgYwsqhUtil.java View File

@@ -5,6 +5,7 @@ import com.iformall.common.ResultData;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.util.ResourceUtils; import org.springframework.util.ResourceUtils;


import javax.imageio.ImageIO; import javax.imageio.ImageIO;
@@ -36,8 +37,10 @@ public class ImgYwsqhUtil {


try { try {


InputStream backImgUrl = ClassLoader.getSystemResourceAsStream(imgTempPath);
// InputStream backImgUrl = ClassLoader.getSystemResourceAsStream(imgTempPath);
// InputStream backImgUrl = ImgYwsqhUtil.class.getClassLoader().getResourceAsStream(imgTempPath); // InputStream backImgUrl = ImgYwsqhUtil.class.getClassLoader().getResourceAsStream(imgTempPath);
ClassPathResource resource = new ClassPathResource(imgTempPath);
InputStream backImgUrl = resource.getInputStream();


BufferedImage backImg = ImageIO.read(backImgUrl); BufferedImage backImg = ImageIO.read(backImgUrl);
Graphics g = backImg.getGraphics(); Graphics g = backImg.getGraphics();


Loading…
Cancel
Save