Answers for "spring environment null pointer exception"

0

spring environment null pointer exception

@Configuration
@PropertySource(value = { "classpath:kid-batch.properties" }, ignoreResourceNotFound = false)
public class BatchConfiguration implements EnvironmentAware {

private static Environment env;

public static String getProperty(String key) {
    return env.getProperty(key);
}

@Override
public void setEnvironment(Environment env) {
    BatchConfiguration.env = env;
}
Posted by: Guest on June-14-2021

Code answers related to "spring environment null pointer exception"

Browse Popular Code Answers by Language