-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathT.java
More file actions
26 lines (20 loc) · 1010 Bytes
/
Copy pathT.java
File metadata and controls
26 lines (20 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.caozj.test;
import java.io.IOException;
import java.util.Map;
import com.caozj.framework.util.file.PropertiesUtil;
import freemarker.core.ParseException;
import freemarker.template.MalformedTemplateNameException;
import freemarker.template.TemplateException;
import freemarker.template.TemplateNotFoundException;
public class T {
public static void main(String[] args) throws TemplateNotFoundException,
MalformedTemplateNameException, ParseException, IOException, TemplateException {
Map<String, String> p = PropertiesUtil.readFileByOrder(
"D:\\local\\develop2.0\\SmartAs\\target\\depoly\\xxx-web\\src\\main\\resources\\config\\app.properties");
p.forEach((key,value)->{
System.out.println(key+":"+value);
});
p.put("datasource.driverClassName", "com.mysql.jdbc.Driver-abcde");
PropertiesUtil.saveFileByOrder("D:\\local\\develop2.0\\SmartAs\\target\\depoly\\xxx-web\\src\\main\\resources\\config\\app.properties", p);
}
}