摘要:
直接上代码public String readConfigAsStringNotJar() throws IOException { // ClassPathResource类的构造方法接收路径名称,自动去classpath路径下找文件 ClassPathResource classPathReso 阅读全文
摘要:
第1步:创建ObjectMapper对象。 创建ObjectMapper对象。它是一个可重复使用的对象。 ObjectMapper mapper = new ObjectMapper(); 第2步:反序列化JSON到对象。 从JSON对象使用readValue()方法来获取。通过JSON字符串和对象 阅读全文