| 
					
				 | 
			
			
				@@ -1,5 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.fs.utils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.apache.commons.lang.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -17,15 +18,20 @@ public class FileCacheService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Value("${getTuiFont}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private String getTuiFont; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Value("${tuiImgCache:0}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private String tuiImgCache; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private byte[] templateBytes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private byte[] fontBytes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostConstruct 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void init() throws IOException { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 缓存模板图片文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.templateBytes = Files.readAllBytes(Paths.get(getTuiImg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 缓存字体文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.fontBytes = Files.readAllBytes(Paths.get(getTuiFont)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(StringUtils.equals("1",tuiImgCache)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 缓存模板图片文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.templateBytes = Files.readAllBytes(Paths.get(getTuiImg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 缓存字体文件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.fontBytes = Files.readAllBytes(Paths.get(getTuiFont)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 |