| | |
| | | package com.java110.web.core; |
| | | |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.*; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.io.Reader; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | Reader reader = null; |
| | | String sb = ""; |
| | | try { |
| | | InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(filePath); |
| | | InputStream inputStream = new ClassPathResource(filePath).getInputStream(); |
| | | //InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(File.separator + filePath); |
| | | reader = new InputStreamReader(inputStream, "UTF-8"); |
| | | int tempChar; |
| | | StringBuffer b = new StringBuffer(); |