Skip to content

Commit

Permalink
Change the separator character among the web explanations from ' ' to…
Browse files Browse the repository at this point in the history
… ';'
  • Loading branch information
vinqin committed May 30, 2018
1 parent e44d841 commit c5f2ad5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
*.iml
out
gen
/target
target
/src/test
Binary file modified setup/YoudaoV3-1.0-SNAPSHOT.jar
Binary file not shown.
8 changes: 6 additions & 2 deletions src/main/java/edu/stu/util/ResultManipulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,15 @@ public static List<WebTranslation> getWebTranslations(JSONObject resultJson) {
String webValue = "";
ArrayList<String> aList = (ArrayList) map1.get("value");
for (String v : aList) {
webValue = webValue + " " + v;
webValue = webValue + "; " + v;
}
webKey = webKey.trim();
webValue = webValue.trim();
//如果webValue第一个字符为';' 则去除该字符
if (webValue.startsWith(";")) {
webValue = webValue.substring(1).trim();
}

webs.add(new WebTranslation(webKey, webValue));
}

Expand Down Expand Up @@ -343,7 +348,6 @@ public static void resultApp(List<WebTranslation> webs) {
resultPrint.append("\"\n");
}


}


Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/dbconfig.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3838/youdao?useSSL=false&allowMultiQueries=true&characterEncoding=UTF-8
jdbc.url=jdbc:mysql://www.qqf.com:3306/youdao?useSSL=false&allowMultiQueries=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=crypto
jdbc.password=meiyoumima

0 comments on commit c5f2ad5

Please sign in to comment.