sean.zhou
2022-09-23 8ce3bb68bdc2250cc4a8a3d29085443fac64615a
src/main/java/com/dji/sample/manage/model/common/HmsJsonUtil.java
@@ -33,7 +33,7 @@
    }
    @PostConstruct
//     @PostConstruct
    private void loadJsonFile() {
        try (InputStream inputStream = new ClassPathResource("hms.json").getInputStream()){
            nodes = mapper.readTree(inputStream);
@@ -44,6 +44,9 @@
    }
    public static HmsMessage get(String key) {
        if (nodes.get(key) == null) {
            return new HmsMessage();
        }
        return mapper.convertValue(nodes.get(key), HmsMessage.class);
    }
}