Commit bed43f3806bbdde5a3af16372c8996c10517cd92
1 parent
770ac5ae
init3...
Showing
4 changed files
with
28 additions
and
3 deletions
src/main/java/com/bsth/util/ConfigUtil.java
| @@ -6,6 +6,8 @@ public class ConfigUtil { | @@ -6,6 +6,8 @@ public class ConfigUtil { | ||
| 6 | 6 | ||
| 7 | static{ | 7 | static{ |
| 8 | tools = new Tools("application.properties"); | 8 | tools = new Tools("application.properties"); |
| 9 | + String active = tools.getValue("spring.profiles.active"); | ||
| 10 | + tools = new Tools("application-"+active+".properties"); | ||
| 9 | } | 11 | } |
| 10 | 12 | ||
| 11 | public static String get(String key){ | 13 | public static String get(String key){ |
src/main/resources/application-dev.properties
0 → 100644
| 1 | +server.port=12580 | ||
| 2 | +management.port= 12500 | ||
| 3 | +management.address= 127.0.0.1 | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +# | ||
| 7 | +### gps client | ||
| 8 | +gps.server.pd=114.80.178.12 | ||
| 9 | +gps.port.pd=8899 | ||
| 10 | +gps.server.pf=180.166.5.82 | ||
| 11 | +gps.port.pf=9030 | ||
| 12 | +forward.device.name=client92 | ||
| 0 | \ No newline at end of file | 13 | \ No newline at end of file |
src/main/resources/application-prod.properties
0 → 100644
| 1 | +server.port=12580 | ||
| 2 | +management.port= 12500 | ||
| 3 | +management.address= 127.0.0.1 | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +# | ||
| 7 | +### gps client | ||
| 8 | +gps.server.pd=10.10.150.21 | ||
| 9 | +gps.port.pd=8899 | ||
| 10 | +gps.server.pf=180.166.5.82 | ||
| 11 | +gps.port.pf=9030 | ||
| 12 | +forward.device.name=client99 | ||
| 0 | \ No newline at end of file | 13 | \ No newline at end of file |