Skip to content

Commit

Permalink
Config reversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Conor Flynn committed Dec 15, 2022
1 parent e605840 commit 268939e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ public class Config {
private static final HashMap<String, Properties> properties;

static {
// properties = new HashMap<String, Properties>();
//
// String[] files = new File("src/main/resources/config").list();
//
// for(String file : files) {
// if(file.lastIndexOf(".properties") == file.length() - 11) {
// String name = file.substring(0, file.length() - 11);
// properties.put(name, new Properties());
//
// try (FileInputStream in = new FileInputStream("src/main/resources/config/" + file)) {
// properties.get(name).load(in);
// } catch(Exception e) {
// e.printStackTrace();
// System.exit(1);
// }
// }
// }

properties = new HashMap<String, Properties>();

Properties app_properties = new Properties();
Expand All @@ -44,7 +26,7 @@ public class Config {
stream_properties.put("rest.socket.address", "DataEngine");
stream_properties.put("rest.socket.port", "61100");
stream_properties.put("rest.socket.key", "rest-key-reserved");
//stream_properties.put("output.socket.address", "localhost");
// stream_properties.put("output.socket.address", "defi-de.idea.rpi.edu");
stream_properties.put("output.socket.address", "RestApp");
stream_properties.put("output.socket.port", "61200");
stream_properties.put("local.stream.type", "mongo_db");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ public class Config {
private static final HashMap<String, Properties> properties;

static {
// properties = new HashMap<String, Properties>();
//
// String[] files = new File("config").list();
//
// for(String file : files) {
// if(file.lastIndexOf(".properties") == file.length() - 11) {
// String name = file.substring(0, file.length() - 11);
// properties.put(name, new Properties());
//
// try (FileInputStream in = new FileInputStream("config/" + file)) {
// properties.get(name).load(in);
// } catch(Exception e) {
// e.printStackTrace();
// System.exit(1);
// }
// }
// }

properties = new HashMap<String, Properties>();

Properties app_properties = new Properties();
Expand All @@ -36,9 +18,9 @@ public class Config {
app_properties.put("general.transfer.delim", "&&&");
app_properties.put("general.data.dateformat", "yyyy-MM-dd");
app_properties.put("spring.server.port", "8080");
//app_properties.put("spring.server.address", "localhost");
app_properties.put("rest.socket.address", "DataEngine");
app_properties.put("spring.server.address", "RestApp");
// app_properties.put("spring.server.address", "defi-de.idea.rpi.edu");
app_properties.put("rest.socket.address", "DataEngine");
app_properties.put("rest.socket.port", "61100");
app_properties.put("rest.socket.key", "rest-key-reserved");
properties.put("app", app_properties);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package test.connection.socket;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -80,6 +79,7 @@ public static void main(String[] args) throws UnknownHostException, IOException
}

public static String request(String str) throws IOException {
System.out.println(str);
URL obj = new URL(str);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
Expand Down

0 comments on commit 268939e

Please sign in to comment.