File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import static de .rwth .idsg .steve .SteveConfiguration .DB ;
1414import static de .rwth .idsg .steve .SteveConfiguration .Jetty ;
1515import static de .rwth .idsg .steve .SteveConfiguration .Ocpp ;
16+ import static de .rwth .idsg .steve .SteveConfiguration .PROFILE ;
1617import static de .rwth .idsg .steve .SteveConfiguration .STEVE_VERSION ;
1718
1819/**
@@ -33,6 +34,8 @@ public static void main(String[] args) throws IOException {
3334
3435 loadProperties ();
3536
37+ log .info ("Loaded the properties. Starting with the '{}' profile" , PROFILE );
38+
3639 JettyServer jettyServer = new JettyServer ();
3740 jettyServer .start ();
3841 }
@@ -41,6 +44,7 @@ private static void loadProperties() throws IOException {
4144 PropertiesFileLoader prop = new PropertiesFileLoader ("main.properties" );
4245
4346 STEVE_VERSION = prop .getString ("steve.version" );
47+ PROFILE = prop .getString ("profile" );
4448
4549 DB .IP = prop .getString ("db.ip" );
4650 DB .PORT = prop .getInt ("db.port" );
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ private SteveConfiguration() { }
2525 // -------------------------------------------------------------------------
2626
2727 public static String STEVE_VERSION ;
28+ public static String PROFILE ;
2829
2930 /**
3031 * Jetty configuration
Original file line number Diff line number Diff line change @@ -36,3 +36,4 @@ ws.session.select.strategy = ALWAYS_LAST
3636# ## DO NOT MODIFY ###
3737steve.version = ${project.version}
3838db.sql.logging = true
39+ profile = dev
Original file line number Diff line number Diff line change @@ -36,3 +36,4 @@ ws.session.select.strategy = ALWAYS_LAST
3636# ## DO NOT MODIFY ###
3737steve.version = ${project.version}
3838db.sql.logging = false
39+ profile = prod
You can’t perform that action at this time.
0 commit comments