|
|
|
@@ -5,6 +5,7 @@ import com.iformall.common.ResultData; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.core.io.ClassPathResource; |
|
|
|
import org.springframework.util.ResourceUtils; |
|
|
|
|
|
|
|
import javax.imageio.ImageIO; |
|
|
|
@@ -36,8 +37,10 @@ public class ImgYwsqhUtil { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
InputStream backImgUrl = ClassLoader.getSystemResourceAsStream(imgTempPath); |
|
|
|
// InputStream backImgUrl = ClassLoader.getSystemResourceAsStream(imgTempPath); |
|
|
|
// InputStream backImgUrl = ImgYwsqhUtil.class.getClassLoader().getResourceAsStream(imgTempPath); |
|
|
|
ClassPathResource resource = new ClassPathResource(imgTempPath); |
|
|
|
InputStream backImgUrl = resource.getInputStream(); |
|
|
|
|
|
|
|
BufferedImage backImg = ImageIO.read(backImgUrl); |
|
|
|
Graphics g = backImg.getGraphics(); |
|
|
|
|