|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.language; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.cybozu.labs.langdetect.Detector; |
|
|
|
import com.cybozu.labs.langdetect.DetectorFactory; |
|
|
|
import com.cybozu.labs.langdetect.LangDetectException; |
|
|
@@ -40,6 +41,7 @@ public class LanguageDetect { |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
log.error("查看初始化数据--"+ JSONObject.toJSONString(profile)); |
|
|
|
if(!profile.isEmpty()){ |
|
|
|
DetectorFactory.loadProfile(profile); |
|
|
|
detect = DetectorFactory.create(); |
|
|
@@ -77,7 +79,6 @@ public class LanguageDetect { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
// var resolver = new PathMatchingResourcePatternResolver(); |
|
|
|
// Resource[] resources = new Resource[0]; |
|
|
|