@wendal
// 使用这个方法,好像是可以了
Connection con = null;
try
{
con = DataSourceUtils.doGetConnection(dataSource);
callback.invoke(con);
}
catch (Exception e)
// 省略
// springMVC.xml
<!-- nutz数据源 -->
<bean id="springDaoRunner" class="com.listener.SpringDaoRunner" />
<bean id="ds" class="org.nutz.dao.impl.SimpleDataSource">
<property name="username" value="nysq_new" />
<property name="password" value="pass" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@36.7.151.36:1521:orcl" />
</bean>
<bean id="dao" class="org.nutz.dao.impl.NutDao">
<constructor-arg>
<ref bean="ds" />
</constructor-arg>
<property name="runner" ref="springDaoRunner"></property>
</bean>
项目启动正常,然后如何在controller和service使用nutz的dao?麻烦给个例子,谢谢