在Spring框架中有如下3种获得DataSource对象的方法:
一、从JNDI获得DataSource
1.在tomcat服务器中的配置示例,在tomcat目录conf/context.xml文件中添加:
Resource
/>