日期:2014-05-18 浏览次数:20642 次
<?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" errorTracingEnabled="true" maxRequests="32" maxSessions="10" maxTransactions="5" useStatementNamespaces="true"/> <transactionManager type="JDBC"> <dataSource type="SIMPLE"> <property name="JDBC.Driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <property name="JDBC.ConnectionURL" value="jdbc:sqlserver://172.16.1.6:1433;DatabaseName=ztest"/> <property name="JDBC.Username" value="XX"/> <property name="JDBC.Password" value="XX"/> <property name="Pool.MaximumActiveConnections" value="10"/> <property name="Pool.MaximumIdleConnections" value="5"/> <property name="Pool.MaximumCheckoutTime" value="120000"/> <property name="Pool.TimeToWait" value="10000"/> <property name="Pool.PingQuery" value="select userId from User"/> <property name="Pool.PingEnabled" value="false"/> <property name="Pool.PingConnectionsOlderThan" value="1"/> <property name="Pool.PingConnectionsNotUsedFor" value="1"/> </dataSource> </transactionManager> <sqlMap resource="ibatis/entity/User.xml" /> </sqlMapConfig>
------解决方案--------------------
网络有问题。
确保网络正常!
------解决方案--------------------
如果可以上网,myeclipse会自动帮你下载http://www.ibatis.com/dtd/sql-map-config-2.dtd对应的dtd,不用配置就有提示,如果不能上网,
可以将jar包中的sql-map-config-2.dtd放到配置文件同一个目录下,然后修改配置文件的头部:
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">