This repository was archived by the owner on Jun 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1010import org .w3c .dom .Document ;
1111import org .w3c .dom .Node ;
1212import org .w3c .dom .NodeList ;
13+ import org .bsrserver .config .Config ;
1314
1415public class Sentences {
1516 private final ArrayList <String > sentences = new ArrayList <>();
@@ -22,7 +23,7 @@ private void updateSentences() {
2223 sentences .clear ();
2324 try {
2425 // request
25- URL url = new URL ("https://www.bsrserver.org:8443/static?prefix=pages/gifs/" );
26+ URL url = new URL (Config . getInstance (). getSentencesUrl () );
2627 HttpURLConnection connection = (HttpURLConnection ) url .openConnection ();
2728 connection .setRequestMethod ("GET" );
2829 Document document = DocumentBuilderFactory .newInstance ().newDocumentBuilder ().parse (connection .getInputStream ());
Original file line number Diff line number Diff line change @@ -53,4 +53,8 @@ public String getDatabasePassword() {
5353 public String getDatabaseTable () {
5454 return configToml .getString ("database.table" );
5555 }
56+
57+ public String getSentencesUrl () {
58+ return configToml .getString ("sentences.url" );
59+ }
5660}
Original file line number Diff line number Diff line change @@ -3,3 +3,6 @@ url = 'jdbc:postgresql://localhost:5432/postgres'
33user = ' postgres'
44password = ' '
55table = ' postgres'
6+
7+ [sentences ]
8+ url = ' http://minio:9000/frontend?prefix=pages/gifs/'
You can’t perform that action at this time.
0 commit comments