Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
7566a197
Commit
7566a197
authored
Dec 15, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix type for spring.data.cassandra.contact-points
Closes gh-11354
parent
bf3aa62a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
CassandraAutoConfiguration.java
...t/autoconfigure/cassandra/CassandraAutoConfiguration.java
+1
-3
CassandraProperties.java
...ork/boot/autoconfigure/cassandra/CassandraProperties.java
+6
-6
additional-spring-configuration-metadata.json
...es/META-INF/additional-spring-configuration-metadata.json
+6
-0
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java
View file @
7566a197
...
@@ -34,7 +34,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
...
@@ -34,7 +34,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.StringUtils
;
/**
/**
* {@link EnableAutoConfiguration Auto-configuration} for Cassandra.
* {@link EnableAutoConfiguration Auto-configuration} for Cassandra.
...
@@ -91,8 +90,7 @@ public class CassandraAutoConfiguration {
...
@@ -91,8 +90,7 @@ public class CassandraAutoConfiguration {
builder
.
withSSL
();
builder
.
withSSL
();
}
}
builder
.
withPoolingOptions
(
getPoolingOptions
());
builder
.
withPoolingOptions
(
getPoolingOptions
());
String
points
=
properties
.
getContactPoints
();
builder
.
addContactPoints
(
properties
.
getContactPoints
().
toArray
(
new
String
[
0
]));
builder
.
addContactPoints
(
StringUtils
.
commaDelimitedListToStringArray
(
points
));
customize
(
builder
);
customize
(
builder
);
return
builder
.
build
();
return
builder
.
build
();
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java
View file @
7566a197
...
@@ -18,6 +18,9 @@ package org.springframework.boot.autoconfigure.cassandra;
...
@@ -18,6 +18,9 @@ package org.springframework.boot.autoconfigure.cassandra;
import
java.time.Duration
;
import
java.time.Duration
;
import
java.time.temporal.ChronoUnit
;
import
java.time.temporal.ChronoUnit
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
com.datastax.driver.core.ConsistencyLevel
;
import
com.datastax.driver.core.ConsistencyLevel
;
import
com.datastax.driver.core.ProtocolOptions
;
import
com.datastax.driver.core.ProtocolOptions
;
...
@@ -55,7 +58,8 @@ public class CassandraProperties {
...
@@ -55,7 +58,8 @@ public class CassandraProperties {
/**
/**
* Comma-separated list of cluster node addresses.
* Comma-separated list of cluster node addresses.
*/
*/
private
String
contactPoints
=
"localhost"
;
private
final
List
<
String
>
contactPoints
=
new
ArrayList
<>(
Collections
.
singleton
(
"localhost"
));
/**
/**
* Port of the Cassandra server.
* Port of the Cassandra server.
...
@@ -148,14 +152,10 @@ public class CassandraProperties {
...
@@ -148,14 +152,10 @@ public class CassandraProperties {
this
.
clusterName
=
clusterName
;
this
.
clusterName
=
clusterName
;
}
}
public
String
getContactPoints
()
{
public
List
<
String
>
getContactPoints
()
{
return
this
.
contactPoints
;
return
this
.
contactPoints
;
}
}
public
void
setContactPoints
(
String
contactPoints
)
{
this
.
contactPoints
=
contactPoints
;
}
public
int
getPort
()
{
public
int
getPort
()
{
return
this
.
port
;
return
this
.
port
;
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
View file @
7566a197
...
@@ -90,6 +90,12 @@
...
@@ -90,6 +90,12 @@
"name"
:
"spring.datasource.initialization-mode"
,
"name"
:
"spring.datasource.initialization-mode"
,
"defaultValue"
:
"embedded"
"defaultValue"
:
"embedded"
},
},
{
"name"
:
"spring.data.cassandra.contact-points"
,
"defaultValue"
:
[
"localhost"
]
},
{
{
"name"
:
"spring.data.cassandra.compression"
,
"name"
:
"spring.data.cassandra.compression"
,
"defaultValue"
:
"none"
"defaultValue"
:
"none"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment