<sqlMapConfig>
<settings useStatementNamespaces ="true" /> //必须
.......
<sqlMap resource=".../a.xml" />
<sqlMap resource=".../b.xml" />
</sqlMapConfig>
------------------------------------------
public class dao extends SqlMapClientDaoSupport{
public List<IndCorp> getAllCorp(String nameSpace) throws Exception {
SqlMapClientTemplate sqlMap = getSqlMapClientTemplate();
List list=null;
if(nameSpace==null||"".equals(nameSpace.trim()))
list=sqlMap.queryForList("getAllCorp");
else
list=sqlMap.queryForList(nameSpace+".getAllCorp");
return list;
}
}