parent
63a3d003dd
commit
67f92bff1e
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire" xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
|
||||
|
||||
<util:properties id="gemfireCacheConfigurationSettings">
|
||||
<prop key="name">GemstonesSpringGemFireApp</prop>
|
||||
<prop key="log-level">config</prop>
|
||||
<prop key="mcast-port">0</prop>
|
||||
</util:properties>
|
||||
|
||||
<gfe:cache properties-ref="gemfireCacheConfigurationSettings" />
|
||||
|
||||
<gfe:replicated-region id="Gemstones" ignore-jta="true"
|
||||
persistent="false" key-constraint="java.lang.Long"
|
||||
value-constraint="sample.data.gemfire.domain.Gemstone" />
|
||||
|
||||
<gfe:transaction-manager id="transactionManager"
|
||||
copy-on-read="true" />
|
||||
|
||||
</beans>
|
@ -1 +1 @@
|
||||
provides: gemfire,spring-data-gemfire
|
||||
provides: spring-data-gemfire
|
||||
|
Loading…
Reference in New Issue