Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified configuration utils and initialization.
- Loading branch information
1 parent
a81525a
commit cce04c3
Showing
25 changed files
with
142 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
rapidoid-commons/src/main/java/org/rapidoid/config/RapidoidInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.rapidoid.config; | ||
|
||
import org.rapidoid.cls.Cls; | ||
import org.rapidoid.commons.RapidoidInfo; | ||
import org.rapidoid.log.Log; | ||
|
||
public class RapidoidInitializer { | ||
|
||
private static boolean initialized; | ||
|
||
public static synchronized void initialize() { | ||
if (!initialized) { | ||
Log.info("Starting Rapidoid...", "version", RapidoidInfo.version()); | ||
|
||
Log.info("Working directory is: " + System.getProperty("user.dir")); | ||
|
||
Cls.getClassIfExists("org.rapidoid.web.RapidoidWebModule"); | ||
|
||
Log.info("Rapidoid is ready."); | ||
|
||
initialized = true; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.