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); } }