Commit fc4ba9dd2bc4f4b805cd3a23a3eb888a5703e4f4
1 parent
9aa8286b
添加数据库连接池参数配置
Showing
1 changed file
with
72 additions
and
0 deletions
class-service.yml
| ... | ... | @@ -15,12 +15,28 @@ spring: |
| 15 | 15 | username: test |
| 16 | 16 | password: 123456 |
| 17 | 17 | driver-class-name: com.mysql.jdbc.Driver |
| 18 | + max-idle=10 | |
| 19 | + max-active=100 | |
| 20 | + max-wait=60000 | |
| 21 | + min-idle=10 | |
| 22 | + initial-size=10 | |
| 23 | + validation-query=SELECT 1 | |
| 24 | + test-on-borrow=true | |
| 25 | + test-while-idle=true | |
| 18 | 26 | read1: |
| 19 | 27 | name: gxb_core |
| 20 | 28 | url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true |
| 21 | 29 | username: test |
| 22 | 30 | password: 123456 |
| 23 | 31 | driver-class-name: com.mysql.jdbc.Driver |
| 32 | + max-idle=10 | |
| 33 | + max-active=100 | |
| 34 | + max-wait=60000 | |
| 35 | + min-idle=10 | |
| 36 | + initial-size=10 | |
| 37 | + validation-query=SELECT 1 | |
| 38 | + test-on-borrow=true | |
| 39 | + test-while-idle=true | |
| 24 | 40 | |
| 25 | 41 | secondDatasource: |
| 26 | 42 | name: gxb_core |
| ... | ... | @@ -28,6 +44,14 @@ spring: |
| 28 | 44 | username: test |
| 29 | 45 | password: 123456 |
| 30 | 46 | driver-class-name: com.mysql.jdbc.Driver |
| 47 | + max-idle=10 | |
| 48 | + max-active=100 | |
| 49 | + max-wait=60000 | |
| 50 | + min-idle=10 | |
| 51 | + initial-size=10 | |
| 52 | + validation-query=SELECT 1 | |
| 53 | + test-on-borrow=true | |
| 54 | + test-while-idle=true | |
| 31 | 55 | redis: |
| 32 | 56 | database: 0 |
| 33 | 57 | host: redis-server |
| ... | ... | @@ -90,12 +114,28 @@ spring: |
| 90 | 114 | username: test |
| 91 | 115 | password: 123456 |
| 92 | 116 | driver-class-name: com.mysql.jdbc.Driver |
| 117 | + max-idle=10 | |
| 118 | + max-active=100 | |
| 119 | + max-wait=60000 | |
| 120 | + min-idle=10 | |
| 121 | + initial-size=10 | |
| 122 | + validation-query=SELECT 1 | |
| 123 | + test-on-borrow=true | |
| 124 | + test-while-idle=true | |
| 93 | 125 | read1: |
| 94 | 126 | name: gxb_core |
| 95 | 127 | url: jdbc:mysql://testdb-master:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true |
| 96 | 128 | username: test |
| 97 | 129 | password: 123456 |
| 98 | 130 | driver-class-name: com.mysql.jdbc.Driver |
| 131 | + max-idle=10 | |
| 132 | + max-active=100 | |
| 133 | + max-wait=60000 | |
| 134 | + min-idle=10 | |
| 135 | + initial-size=10 | |
| 136 | + validation-query=SELECT 1 | |
| 137 | + test-on-borrow=true | |
| 138 | + test-while-idle=true | |
| 99 | 139 | |
| 100 | 140 | secondDatasource: |
| 101 | 141 | name: gxb_core |
| ... | ... | @@ -103,6 +143,14 @@ spring: |
| 103 | 143 | username: test |
| 104 | 144 | password: 123456 |
| 105 | 145 | driver-class-name: com.mysql.jdbc.Driver |
| 146 | + max-idle=10 | |
| 147 | + max-active=100 | |
| 148 | + max-wait=60000 | |
| 149 | + min-idle=10 | |
| 150 | + initial-size=10 | |
| 151 | + validation-query=SELECT 1 | |
| 152 | + test-on-borrow=true | |
| 153 | + test-while-idle=true | |
| 106 | 154 | redis: |
| 107 | 155 | database: 0 |
| 108 | 156 | host: redis-server |
| ... | ... | @@ -164,12 +212,28 @@ spring: |
| 164 | 212 | username: postgres |
| 165 | 213 | password: 5095e001221824498ea622e89bdd3627 |
| 166 | 214 | driver-class-name: com.mysql.jdbc.Driver |
| 215 | + max-idle=10 | |
| 216 | + max-active=100 | |
| 217 | + max-wait=60000 | |
| 218 | + min-idle=10 | |
| 219 | + initial-size=10 | |
| 220 | + validation-query=SELECT 1 | |
| 221 | + test-on-borrow=true | |
| 222 | + test-while-idle=true | |
| 167 | 223 | read1: |
| 168 | 224 | name: gxb_core |
| 169 | 225 | url: jdbc:mysql://db3:3306/gxb_core?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true |
| 170 | 226 | username: postgres |
| 171 | 227 | password: 5095e001221824498ea622e89bdd3627 |
| 172 | 228 | driver-class-name: com.mysql.jdbc.Driver |
| 229 | + max-idle=10 | |
| 230 | + max-active=100 | |
| 231 | + max-wait=60000 | |
| 232 | + min-idle=10 | |
| 233 | + initial-size=10 | |
| 234 | + validation-query=SELECT 1 | |
| 235 | + test-on-borrow=true | |
| 236 | + test-while-idle=true | |
| 173 | 237 | |
| 174 | 238 | secondDatasource: |
| 175 | 239 | name: gxb_core |
| ... | ... | @@ -177,6 +241,14 @@ spring: |
| 177 | 241 | username: postgres |
| 178 | 242 | password: 5095e001221824498ea622e89bdd3627 |
| 179 | 243 | driver-class-name: com.mysql.jdbc.Driver |
| 244 | + max-idle=10 | |
| 245 | + max-active=100 | |
| 246 | + max-wait=60000 | |
| 247 | + min-idle=10 | |
| 248 | + initial-size=10 | |
| 249 | + validation-query=SELECT 1 | |
| 250 | + test-on-borrow=true | |
| 251 | + test-while-idle=true | |
| 180 | 252 | redis: |
| 181 | 253 | database: 0 |
| 182 | 254 | host: redis1 | ... | ... |