|
@@ -110,9 +110,9 @@ public class IPUtil {
|
|
try {
|
|
try {
|
|
// File file = ResourceUtils.getFile("classpath:ip2region.db");
|
|
// File file = ResourceUtils.getFile("classpath:ip2region.db");
|
|
|
|
|
|
- File file = new File("ip2region.db");//临时图片存在的位置
|
|
|
|
|
|
+ File file = new File("/ip2region.db");//临时图片存在的位置
|
|
if (!file.exists()) {
|
|
if (!file.exists()) {
|
|
- Resource resource = new ClassPathResource("ip2region.db");
|
|
|
|
|
|
+ Resource resource = new ClassPathResource("/ip2region.db");
|
|
try {
|
|
try {
|
|
InputStream inputStream = resource.getInputStream();
|
|
InputStream inputStream = resource.getInputStream();
|
|
inputstreamtofile(inputStream, file);
|
|
inputstreamtofile(inputStream, file);
|