阿里巴巴的datasource:
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">

结合使用spring的jdbcTemplate
@Autowired
DruidDataSource dataSource;

jdbcTemplate = new JdbcTemplate(dataSource);
int rowCount = this.jdbcTemplate.queryForObject("select count(*) from price_base", Integer.class);

当前也可以使用spring的JdbcDaoSupport
具体参考:http://www.mkyong.com/spring/spring-jdbctemplate-jdbcdaosupport-examples/

标签: none


阿里云优惠主机

添加新评论

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。