Skip to content

Commit 7ba6718

Browse files
committed
spring-atticGH-3: Use messages as a default table name
Fixes: spring-atticGH-3 (spring-attic#3)
1 parent 81d143c commit 7ba6718

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

spring-cloud-starter-stream-sink-jdbc/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The **$$jdbc$$** $$sink$$ has the following options:
1111
$$jdbc.columns$$:: $$The names of the columns that shall receive data, as a set of column[:SpEL] mappings.
1212
Also used at initialization time to issue the DDL.$$ *($$java.util.Map<java.lang.String,java.lang.String>$$, default: `$$<none>$$`)*
1313
$$jdbc.initialize$$:: $$'true', 'false' or the location of a custom initialization script for the table.$$ *($$String$$, default: `$$false$$`)*
14-
$$jdbc.table-name$$:: $$The name of the table to write into.$$ *($$String$$, default: `$$<none>$$`)*
14+
$$jdbc.table-name$$:: $$The name of the table to write into.$$ *($$String$$, default: `$$messages$$`)*
1515
$$spring.datasource.driver-class-name$$:: $$Fully qualified name of the JDBC driver. Auto-detected based on the URL by default$$ *($$String$$, default: `$$<none>$$`)*
1616
$$spring.datasource.schema$$:: $$Schema (DDL) script resource reference$$ *($$String$$, default: `$$<none>$$`)*
1717
$$spring.datasource.data$$:: $$Data (DML) script resource reference.$$ *($$String$$, default: `$$<none>$$`)*

spring-cloud-starter-stream-sink-jdbc/src/main/java/org/springframework/cloud/stream/app/jdbc/sink/JdbcSinkProperties.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import java.util.Collections;
2020
import java.util.Map;
2121

22-
import org.springframework.beans.factory.annotation.Value;
2322
import org.springframework.boot.context.properties.ConfigurationProperties;
2423

2524
/**
@@ -33,8 +32,7 @@ public class JdbcSinkProperties {
3332
/**
3433
* The name of the table to write into.
3534
*/
36-
@Value("${spring.application.name:messages}")
37-
private String tableName;
35+
private String tableName = "messages";
3836

3937
/**
4038
* The names of the columns that shall receive data, as a set of column[:SpEL] mappings.

0 commit comments

Comments
 (0)