转化流程:先将输入流转为String类型,再使用alibaba的json转换工具,将字符串转化为json数组 SensorDevices sensorDevices = new SensorDevices(); request.setCharacterEncoding("utf-8"); JSONObject json = new JSONObject(); JSONArray list = new JSONArray(); BufferedReader br; String line
1. 区分 #{} 和 ${}的不同应用场景 1)#{} 会生成预编译SQL,会正确的处理数据的类型,而${}仅仅是文本替换.对于SQL: select * from student where xCode = ‘S123456’:如果使用#{}那么生成的SQL为:select * from student where xCode = ? 传的值为’S123456’:如果使用${}那么生成的SQL为:select * from student where xCode = S123456如果xCo