Skip to content

Commit cfec067

Browse files
committed
Add AdvancedConnectionPool.java
1 parent e619a41 commit cfec067

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package spring.oldboy.pool;
2+
3+
/* Создадим класс без явно указанного пустого конструктора */
4+
5+
import java.util.List;
6+
import java.util.Map;
7+
8+
public class AdvancedConnectionPool {
9+
/* Зададим 4-и разноплановых поля */
10+
private final String username;
11+
private final String login;
12+
private final Integer poolSize;
13+
private final List<Object> args;
14+
private final Map<String, Object> properties;
15+
16+
/* Конструктор, который необходимо явно конфигурировать в application.xml */
17+
18+
public AdvancedConnectionPool(String username,
19+
String login,
20+
Integer poolSize,
21+
List<Object> args,
22+
Map<String, Object> properties) {
23+
this.username = username;
24+
this.login = login;
25+
this.poolSize = poolSize;
26+
this.args = args;
27+
this.properties = properties;
28+
}
29+
}

0 commit comments

Comments
 (0)