You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -80,22 +123,23 @@ This will be supported by defining a single SQL data source, such as:
80
123
```yaml
81
124
# this section is required for our testcontainer support
82
125
test.database:
83
-
username: "test"# will be honored
84
-
password: "changeit"# will be honored
85
-
url: "jdbc:mysql://localhost:3306/testdb"# everything except port is honored
126
+
username: "test"
127
+
password: "changeit"
128
+
url: "jdbc:mysql://localhost:3306/testdb"
86
129
87
130
# this section is the usual Helidon Data setup of data sources and persistence units
88
-
data-sources:
89
-
sql:
90
-
- name: "test"# arbitrary name
91
-
provider.hikari: # any provider that extends `ConnectionConfig`
92
-
username: "${test.database.username}"
93
-
password: "${test.database.password}"
94
-
url: "${test.database.url}"
131
+
data:
132
+
sources:
133
+
sql:
134
+
- name: "test"
135
+
provider.hikari:
136
+
username: "${test.database.username}"
137
+
password: "${test.database.password}"
138
+
url: "${test.database.url}"
139
+
persistence-units:
140
+
jakarta:
141
+
- data-source: "test"
95
142
```
96
143
97
144
This information will be read by `io.helidon.data.sql.testing.SqlTestContainerConfig.configureContainer(io.helidon.common.config.Config, org.testcontainers.containers.JdbcDatabaseContainer<?>)` and a container will be initialized with it.
98
145
The method returns a `TestContainerHandler` that can be used to start and stop the container, and to get the new mapped port. Its method `setConfig()` can be called to register the config instance with updated port numbers in ServiceRegistry
Copy file name to clipboardExpand all lines: data/sql/datasource/datasource/src/main/java/io/helidon/data/sql/datasource/DataSourceConfigBlueprint.java
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -21,16 +21,18 @@
21
21
22
22
/**
23
23
* {@link javax.sql.DataSource} configuration.
24
-
* <p>This is the {@code data-source} configuration array member node of the {@code DataSource} configuration with {@code name}
24
+
* <p>This is the {@code data.sources} configuration array member node of the {@code DataSource} configuration with {@code name}
0 commit comments