赞
踩
Maven
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>druid</artifactId>
- <version>1.1.10</version>
- </dependency>
获取密钥
在你jar包所在目录下执行:
- #执行获取加密后的密码、公钥以及私钥
- java -cp druid-1.0.16.jar com.alibaba.druid.filter.config.ConfigTools your_password
代码
- public class ConnectPool {
- private static Logger logger = LoggerFactory.getLogger(ConnectPool.class);
-
- private static DruidDataSource dataSource;
-
- /**
- * 获取连接池
- *
- * @return
- */
- public static DataSource getDataSource() {
-
- if (dat
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。