在一个方法中,每次往不同properties中写入键值对时,都需要重新new一个对象吗
out=new FileOutputStream("src/main/resources/properties/grpc_service.properties");
pps.store(out,"andieguo modify" + new Date().toString());
out.close();
out=new FileOutputStream("src/main/resources/properties/jdbc.properties");
pps1.store(out,"andieguo modify" + new Date().toString());
out.close();
out=new FileOutputStream("src/main/resources/properties/Kafka_setting.properties");
pps2.store(out,"andieguo modify" + new Date().toString());
out.close();
各位大神有没有好一点的建议,,,