mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-30 01:46:18 +08:00
cortana ready
This commit is contained in:
33
src/main/java/love/sola/netsupport/config/Cortana.java
Normal file
33
src/main/java/love/sola/netsupport/config/Cortana.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package love.sola.netsupport.config;
|
||||
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* Created by Sola on 2015/12/29.
|
||||
* Don't modify this source without my agreement
|
||||
* ***********************************************
|
||||
*/
|
||||
public class Cortana {
|
||||
|
||||
|
||||
public static List<Compiled> entries;
|
||||
|
||||
public static void load() {
|
||||
InputStream in = Lang.class.getClassLoader().getResourceAsStream("cortana.yml");
|
||||
Map<String, Object> root = (Map<String, Object>) new Yaml().load(in);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static class Compiled {
|
||||
Pattern[] patterns;
|
||||
String[] replies;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user