首页 > spring整合ibaits出错,实在找不到问题所在

spring整合ibaits出错,实在找不到问题所在

IOException parsing XML document from class path resource [sqlMapConfig.xml]; nested exception is java.net.ConnectException: Connection timed out: connect

我的sqlMapConfig.xml文件如下:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true" enhancementEnabled="true"
    lazyLoadingEnabled="true" maxRequests="32" maxSessions="10"
    maxTransactions="5" useStatementNamespaces="true" />
<sqlMap resource="com/fruit/config/sqlmap/merchant.xml"/>
</sqlMapConfig>

不知道是什么问题 补充一下,我连的数据库是mysql,防火墙都关了,如果直接用ClassPathXmlApplicationContext是可以访问数据库的。


sqlMapConfig.xml文件是不是写的有问题

【热门文章】
【热门文章】