From 5dc6d822c881399aef304800fbe03499d657b8c5 Mon Sep 17 00:00:00 2001 From: cross Date: Sun, 11 Nov 2018 15:29:20 +0800 Subject: [PATCH] db.naming.convention --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 59fdb0b..02d7910 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ About value and default value: 1. if `hikari` found in the value then it will use the `act.db.sql.datasource.HikariDataSourceProvider` 1. otherwise if `druid` found in the value then it will use the `act.db.sql.datasource.DruidDataSourceProvider` -1. otherwise if the value starts with `shared:` then it will try to extract the `dbId` from the value, e.g. if value is `shared:ds1` then the `dbId` is `ds1`, after that it will try to load the db service with id `ds1` and use the datasource of that db service and feed into the current db service being configured. This allows multiple db service share the same datasource instance. **Note** app must make sure the db service been referenced has already configured and the db service must be an implementation of `SqlDbService`. If a datasource is configured as shared datasource then it does not need to configure other datasource properties e.g. url, username etc. However the `naming.convention` still needs to be configured to make the db service able to mapping between table/column and class/field. +1. otherwise if the value starts with `shared:` then it will try to extract the `dbId` from the value, e.g. if value is `shared:ds1` then the `dbId` is `ds1`, after that it will try to load the db service with id `ds1` and use the datasource of that db service and feed into the current db service being configured. This allows multiple db service share the same datasource instance. **Note** app must make sure the db service been referenced has already configured and the db service must be an implementation of `SqlDbService`. If a datasource is configured as shared datasource then it does not need to configure other datasource properties e.g. url, username etc. However the `db.naming.convention` still needs to be configured to make the db service able to mapping between table/column and class/field. 1. otherwise if specified then it will try to load the `DataSourceProvider` instance by using `Act.getInstance()` 1. if not specified then system will probe the class loader by try loading `com.zaxxer.hikari.HikariConfig` or `com.alibaba.druid.pool.DruidDataSource` and load the hikari CP provider or druid provider respectively @@ -83,7 +83,7 @@ Specifies the default transaction isolation level, could be one of the following Default value: `READ_COMMITTED` -#### `naming.convention` +#### `db.naming.convention` Specify the naming convention to map Entity class name to table name and the property name to column name @@ -235,4 +235,4 @@ s = miscConf.get("poolPreparedStatements"); if (null != s) { source.setPoolPreparedStatements(Boolean.parseBoolean(s)); } -``` \ No newline at end of file +```