Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

get value from Spring application.properties

public final class AppUtils {
    private static final Properties properties;

    static {
        properties = new Properties();

        try {
            ClassLoader classLoader = AppUtils.class.getClassLoader();
            InputStream applicationPropertiesStream = classLoader.getResourceAsStream("application.properties");
            applicationProperties.load(applicationPropertiesStream);
        } catch (Exception e) {
            // process the exception
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: for() in java 
Java :: syntax of the switch statement in Java 
Java :: capture console output java 
Java :: java stream findany 
Java :: creating an object in java 
Java :: set decimal point in java 
Java :: java how to create subclass 
Java :: java read fule get String 
Java :: Java Singleton Class Syntax 
Java :: how to set the length to int array in java 
Java :: android studio convert java to kotlin 
Java :: display hello world in android app 
Java :: splash full screen android 
Java :: math.pow(x2-x1,2) 
Java :: javax 
Java :: Split string into a string array 
Java :: java programming problems 
Java :: syntax for java interfaces 
Java :: Permutations of array in Java 
Java :: java textwatcher 
Java :: java exception handling 
Java :: empty map entry java 
Java :: how to set credentials for speechClient Java google api 
Java :: java default access modifier 
Java :: gson to class 
Java :: android java convert boolean to string 
Java :: the crystallization in time is the phenomenon that we call synchronization 
Java :: i have use tried catch but still prints exception java 
Java :: printing array in descending order 
Java :: Java Creating HashMap from Other Maps 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =