private static void loadLatkeProps ( ) { if ( null == latkeProps ) { latkeProps = new Properties ( ) ; } try { InputStream resourceAsStream ; final String latkePropsEnv = System . getenv ( "LATKE_PROPS" ) ; if ( StringUtils . isNotBlank ( latkePropsEnv ) ) { LOGGER . debug ( "Loading latke.properties from env var [$LATKE_PROPS=" + latkePropsEnv + "]" ) ; resourceAsStream = new FileInputStream ( latkePropsEnv ) ; } else { LOGGER . debug ( "Loading latke.properties from classpath [/latke.properties]" ) ; resourceAsStream = Latkes . class . getResourceAsStream ( "/latke.properties" ) ; } if ( null != resourceAsStream ) { latkeProps . load ( resourceAsStream ) ; LOGGER . debug ( "Loaded latke.properties" ) ; } } catch ( final Exception e ) { LOGGER . log ( Level . ERROR , "Loads latke.properties failed" , e ) ; throw new RuntimeException ( "Loads latke.properties failed" ) ; } }
Loads the latke . props .