Package org.springframework.boot.bind

Examples of org.springframework.boot.bind.RelaxedPropertyResolver.containsProperty()


  @Override
  public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
    RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
        event.getEnvironment(), "spring.");
    if (resolver.containsProperty("mandatoryFileEncoding")) {
      String encoding = System.getProperty("file.encoding");
      String desired = resolver.getProperty("mandatoryFileEncoding");
      if (encoding != null && !desired.equalsIgnoreCase(encoding)) {
        logger.error("System property 'file.encoding' is currently '" + encoding
            + "'. It should be '" + desired
View Full Code Here


  @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()));
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.