Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed propertyplaceholderconfigurer to support default properties v…

…alues
  • Loading branch information...
commit 067d3eab85673e8bc3f8ba65e4dcc2ad888fcce6 1 parent 3e0beef
tomek authored
View
2  pom.xml
@@ -5,7 +5,7 @@
<groupId>com.kuprowski</groupId>
<artifactId>helenos</artifactId>
- <version>1.0-RC2</version>
+ <version>1.0-RC3</version>
<packaging>war</packaging>
<name>helenos</name>
<developers>
View
2  src/main/resources/helenos.properties
@@ -1,2 +0,0 @@
-host=dev-host1
-cluster.name=LookmindersCluster
View
4 src/main/webapp/WEB-INF/context/applicationContext-hector.xml
@@ -6,11 +6,11 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator">
- <constructor-arg value="${host}" />
+ <constructor-arg value="${hosts?localhost:9160}" />
</bean>
<bean id="cluster" class="me.prettyprint.cassandra.service.ThriftCluster">
- <constructor-arg value="${cluster.name}" />
+ <constructor-arg value="${cluster.name?TestCluster}" />
<constructor-arg ref="cassandraHostConfigurator" />
</bean>
View
3  src/main/webapp/WEB-INF/context/applicationContext.xml
@@ -7,7 +7,8 @@
<context:annotation-config />
<context:component-scan base-package="com.kuprowski.helenos.service"/>
- <context:property-placeholder system-properties-mode="OVERRIDE" location="classpath:helenos.properties"/>
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:valueSeparator="?" p:location="classpath:helenos.properties" p:fileEncoding="UTF-8" p:ignoreResourceNotFound="true" p:ignoreUnresolvablePlaceholders="true" />
<bean id="mapper" class="org.dozer.DozerBeanMapper" scope="singleton">
<property name="mappingFiles">
View
2  src/test/resources/helenos.properties
@@ -1,2 +1,2 @@
-host=localhost
+hosts=localhost:9160
cluster.name=FooCluster
Please sign in to comment.
Something went wrong with that request. Please try again.