Java 类org.springframework.boot.bind.RelaxedNames 实例源码

项目:spring-cloud-dataflow    文件:DefaultTaskService.java   
private void updateDataFlowUriIfNeeded(Map<String, String> appDeploymentProperties, List<String> commandLineArgs) {
    if (StringUtils.isEmpty(this.dataflowServerUri)) {
        return;
    }
    RelaxedNames relaxedNames = new RelaxedNames(DATAFLOW_SERVER_URI_KEY);
    for (String dataFlowUriKey : relaxedNames) {
        if (appDeploymentProperties.containsKey(dataFlowUriKey)) {
            return;
        }
        for (String cmdLineArg : commandLineArgs) {
            if (cmdLineArg.contains(dataFlowUriKey + "=")) {
                return;
            }
        }
    }
    appDeploymentProperties.put(DATAFLOW_SERVER_URI_KEY, this.dataflowServerUri);
}
项目:nb-springboot    文件:SpringBootServiceImpl.java   
@Override
public ConfigurationMetadataProperty getPropertyMetadata(String propertyName) {
    if (cpExec == null) {
        init();
    }
    if (cachedProperties != null) {
        // generate and try relaxed variants
        for (String relaxedName : new RelaxedNames(propertyName)) {
            if (cachedProperties.containsKey(relaxedName)) {
                return cachedProperties.get(relaxedName);
            } else {
                // try to interpret array notation (strip '[index]' from pName)
                Matcher mArrNot = pArrayNotation.matcher(relaxedName);
                if (mArrNot.matches()) {
                    return cachedProperties.get(mArrNot.group(1));
                } else {
                    // try to interpret map notation (see if pName starts with a set of known map props)
                    for (String mapPropertyName : getMapPropertyNames()) {
                        if (relaxedName.startsWith(mapPropertyName)) {
                            return cachedProperties.get(mapPropertyName);
                        }
                    }
                }
            }
        }
    }
    return null;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthMvcEndpoint.java   
private HttpStatus getStatus(Health health) {
    String code = health.getStatus().getCode();
    if (code != null) {
        code = code.toLowerCase().replace("_", "-");
        for (String candidate : RelaxedNames.forCamelCase(code)) {
            HttpStatus status = this.statusMapping.get(candidate);
            if (status != null) {
                return status;
            }
        }
    }
    return null;
}
项目:spring-boot-concourse    文件:HealthMvcEndpoint.java   
private HttpStatus getStatus(Health health) {
    String code = health.getStatus().getCode();
    if (code != null) {
        code = code.toLowerCase().replace("_", "-");
        for (String candidate : RelaxedNames.forCamelCase(code)) {
            HttpStatus status = this.statusMapping.get(candidate);
            if (status != null) {
                return status;
            }
        }
    }
    return null;
}
项目:contestparser    文件:HealthMvcEndpoint.java   
private HttpStatus getStatus(Health health) {
    String code = health.getStatus().getCode();
    if (code != null) {
        code = code.toLowerCase().replace("_", "-");
        for (String candidate : RelaxedNames.forCamelCase(code)) {
            HttpStatus status = this.statusMapping.get(candidate);
            if (status != null) {
                return status;
            }
        }
    }
    return null;
}