zhucezhanghu1
2015-09-28 12:19struts spring mybatis 整合出问题
报错:
IOException parsing XML document from ServletContext resource [/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/applicationContext.xml]
配置文件applicationContext.xml
</beans>
<!-- 数据库连接池 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/test" />
<property name="user" value="root" />
<property name="password" value="admin" />
<property name="initialPoolSize" value="10" />
<property name="minPoolSize" value="5" />
<property name="maxPoolSize" value="30" />
<property name="acquireIncrement" value="10" />
<property name="maxIdleTime" value="10" />
<property name="maxStatements" value="0" />
</bean>
<!-- 使用spring的会话管理 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="c3p0dataSource" />
<property name="configLocation" value="classpath:Configuration.xml" />
</bean>
<!-- 使用spring的事务管理 -->
<bean name="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- java SSM整合问题,无法进入Controller
- mybati
- java
- spring
- ssh
- 13个回答
- 关于学习三大框架的疑问
- mybatis
- struts
- spring
- 框架
- 移植
- 2个回答
- Spring Struts Mybatis 整合
- mybatis
- struts
- spring
- maven
- 框架
- 1个回答
- 跪求struts2 spring ibatis整合的jar包
- ssi环境搭建需求包
- 4个回答