Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhi13man authored Jan 15, 2024
1 parent f1f61ee commit 6fa37a9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ intended to be used for generating code for configuring data sources during the
exactEntityPackages = {
"com.sample.project.sample_service.entities.mysql"
},
primaryDataSourceConfig = @DataSourceConfig(dataSourceName = "master"),
primaryDataSourceConfig = @DataSourceConfig(
dataSourceName = "master",
overridingPropertiesPath = "spring.datasource.master.extra-properties"
),
secondaryDataSourceConfigs = {
@DataSourceConfig(dataSourceName = "replica-2"),
@DataSourceConfig(dataSourceName = "read-replica")
Expand Down Expand Up @@ -218,12 +221,16 @@ intended to be used for generating code for configuring data sources during the
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
type: com.zaxxer.hikari.HikariDataSource
read-replica: # This will become the kebab case of the data source name
extra-properties:
hibernate.generate_statistics: true # Generate hibernate statistics only for master data source.
read-replica: # This will become the kebab case of the data source name
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${READ_REPLICA_DB_IP}:${DB_PORT}/${READ_REPLICA_DB_NAME}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
type: com.zaxxer.hikari.HikariDataSource
jpa.properties: # Global JPA Properties
hibernate.generate_statistics: false
```
8. Please always go through the generated code to learn more about what configs to give and what
Expand Down

0 comments on commit 6fa37a9

Please sign in to comment.