Fixed missing kustvakt-lite.conf
Change-Id: I633628c5eb9b627881a275dfc7539d0bcc5efdd4
diff --git a/lite/Changes b/lite/Changes
index c71a518..97bd277 100644
--- a/lite/Changes
+++ b/lite/Changes
@@ -1,7 +1,8 @@
version 0.60
-08/03/2018
+15/03/2018
- updated field type:date in the metadata test (margaretha)
- removed loading application context via BeanFactory (margaretha)
+ - fixed missing kustvakt-lite.conf (margaretha))
version 0.59.9
01/02/2018
diff --git a/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java b/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
index 2e3045a..123c1d1 100644
--- a/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
+++ b/lite/src/main/java/de/ids_mannheim/korap/server/KustvaktLiteServer.java
@@ -1,5 +1,11 @@
package de.ids_mannheim.korap.server;
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+import java.util.Properties;
+
+import de.ids_mannheim.korap.config.KustvaktConfiguration;
import de.ids_mannheim.korap.web.KustvaktBaseServer;
public class KustvaktLiteServer extends KustvaktBaseServer {
@@ -11,6 +17,20 @@
if (kargs == null) System.exit(0);
+ File f = new File("kustvakt-lite.conf");
+ if (!f.exists()){
+ URL url = KustvaktLiteServer.class.getClassLoader().getResource("kustvakt-lite.conf");
+ if (url!=null){
+ f = new File(url.toURI());
+ }
+ }
+
+ Properties properties = new Properties();
+ FileInputStream in = new FileInputStream(f);
+ properties.load(in);
+ in.close();
+ config = new KustvaktConfiguration(properties);
+
kargs.setSpringConfig("lite-config.xml");
kargs.setRootPackages(
new String[] { "de.ids_mannheim.korap.web.service.lite" });