public class LoadProperties {
protected static Properties properties;
public static void loadProp() {
properties = new Properties();
try {
properties.load(LoadProperties.class.getResourceAsStream("/cassandra.properties"));
} catch (IOException e) {
e.printStackTrace();
}
String clusterName = properties.getProperty("cluster.name");
String clusterHosts = properties.getProperty("cluster.hosts");
String keyspace = properties.getProperty("cassandra.keyspace");
String columnFamily = properties.getProperty("cassandra.syslogColumnFamily");
}
public static void main(String[] args) {
LoadProperties.loadProp();
}
}