-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: extract configure to xutest.properties.
- Loading branch information
ityoung
committed
Apr 15, 2018
1 parent
818813c
commit 8c72281
Showing
5 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.xutest; | ||
|
||
|
||
import java.io.FileOutputStream; | ||
import java.io.FileReader; | ||
import java.io.FileWriter; | ||
import java.io.IOException; | ||
import java.util.Map.Entry; | ||
import java.util.Properties; | ||
import java.util.Set; | ||
|
||
public class PropertiesReader { | ||
|
||
//读取配置文件, 加载配置文件到Properties | ||
public static Properties getProperties() throws IOException{ | ||
//创建一个Properties | ||
Properties properties = new Properties(); | ||
//建立输入字符流对象 | ||
FileReader fileReader = new FileReader("src/xutest.properties"); | ||
//加载配置文件的数据到Properties | ||
properties.load(fileReader); | ||
return properties; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
base_url=http://192.168.0.29:8011 | ||
app_id=376223a60d7811e883dc448a5b61a7f0 | ||
app_key=cf71ab7e937620de5767ecc08780a69b | ||
project_id=5a7fb0f047de9d5cf3d13a45 |