당신은 StandardEnvironment
의 자신의 구현을 제공 할 수 있습니다. 예를 들어
:
public static void main(String[] args) {
SpringApplicationBuilder applicationBuilder = new SpringApplicationBuilder(Application.class)
.environment(new StandardEnvironment(){
@Override
protected void customizePropertySources(MutablePropertySources propertySources) {
// do not add system or env properties to the set of property sources
}
});
applicationBuilder.run(args);
}
또는 대안 :
public static void main(String[] args) {
SpringApplicationBuilder applicationBuilder = new SpringApplicationBuilder(Application.class)
.environment(new StandardEnvironment(){
@Override
public Map<String, Object> getSystemEnvironment() {
return new HashMap<>();
}
@Override
public Map<String, Object> getSystemProperties() {
return new HashMap<>();
}
});
applicationBuilder.run(args);
}
어느 쪽이든, 당신은 당신의 응용 프로그램의 특성은 어떤 시스템이나 환경 속성을 포함하지 않도록.
원하는 이유가 무엇입니까? 문맥을 이해하기 위해서 – pvpkiran