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
Since Spring 2+ uses Hikari to manage datasources, to configure the driver we would need to specify the `data-source-properties` under `hikari`.
159
161
Whenever Hikari is used, we also need to ensure failover exceptions are handled correctly so connections will not be discarded from the pool after failover has occurred. This can be done by overriding the exception handling class. For more information on this, please see [the documentation on HikariCP](../../docs/using-the-jdbc-driver/using-plugins/UsingTheFailoverPlugin.md#hikaricp).
160
162
161
163
This example contains some very simple configurations for the IAM Authentication plugin, if you are interested in other configurations related to failover, please visit [the documentation for failover parameters](../../docs/using-the-jdbc-driver/using-plugins/UsingTheFailoverPlugin.md#failover-parameters)
162
164
2. Configure Hibernate dialect:
163
-
```yaml
164
-
jpa:
165
+
166
+
```yaml
167
+
spring:
168
+
jpa:
165
169
properties:
166
170
hibernate:
167
171
dialect: org.hibernate.dialect.PostgreSQLDialect
168
-
```
172
+
```
169
173
3. [Optional] You can enable driver logging by adding the following to `application.yml`:
170
-
```yaml
171
-
logging:
172
-
level:
173
-
software:
174
-
amazon:
175
-
jdbc: TRACE
176
-
```
174
+
175
+
```yaml
176
+
logging:
177
+
level:
178
+
software.amazon.jdbc: TRACE
179
+
```
177
180
178
181
Start the application by running `./gradlew :springhibernate:bootRun` in the terminal. You should see the application making a connection to the database and fetching data from the Example table.
0 commit comments