对象池类GenericObjectPool
通过集成它来实现类似有数据库连接池的功能,具体的查看GenericObjectPool源码
<dependency> <groupId>commons-pool</groupId> <artifactId>commons-pool</artifactId> <version>1.6</version></dependency>