use of org.springframework.boot.ansi.AnsiOutput.Enabled in project spring-boot by spring-projects.
the class AnsiOutputApplicationListener method onApplicationEvent.
@Override
public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(event.getEnvironment(), "spring.output.ansi.");
if (resolver.containsProperty("enabled")) {
String enabled = resolver.getProperty("enabled");
AnsiOutput.setEnabled(Enum.valueOf(Enabled.class, enabled.toUpperCase()));
}
if (resolver.containsProperty("console-available")) {
AnsiOutput.setConsoleAvailable(resolver.getProperty("console-available", Boolean.class));
}
}
Aggregations