Polish Pivotal GemFire starter and sample

Closes gh-5439
This commit is contained in:
John Blum
2016-03-17 14:12:30 -07:00
committed by Stephane Nicoll
parent 63a3d003dd
commit 67f92bff1e
10 changed files with 197 additions and 105 deletions

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2010-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample.data.gemfire.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.StringUtils;
/**
* The SampleDataGemFireApplicationProperties class...
*
* @author John Blum
* @since 1.0.0
*/
@ConfigurationProperties(prefix = "sample.data.gemfire")
public class SampleDataGemFireApplicationProperties {
protected static final String DEFAULT_LOG_LEVEL = "config";
private String logLevel = DEFAULT_LOG_LEVEL;
protected String defaultIfEmpty(String value, String defaultValue) {
return (StringUtils.hasText(value) ? value : defaultValue);
}
public String getLogLevel() {
return defaultIfEmpty(this.logLevel, DEFAULT_LOG_LEVEL);
}
public void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
}