问,在spring中配置的事物是否可以加载多个sqlConfig.xml文件?比如我还想加入一个test-sqlConfig.xml,如何配置
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>classpath:user-sqlConfig.xml</value>
</property>
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>classpath:user-sqlConfig.xml</value>
</property>
<property name="dataSource" ref="dataSource" />
</bean>
<value>classpath:user-sqlConfig.xml</value>
</property>
<property name="configLocation2">
<value>classpath:user-sqlConfig.xml</value>
</property><property name="mappingLocations">
<list>
<value>classpath:/com/*/bo/*.hbm.xml</value>
<value>classpath:/com/xxx/main/hibernate/*.hbm.xml</value>
</list>
</property>
你加那么多sqlconfig.xml文件干嘛?
我的很多工程里面都只有一个这样的文件,并且每个文件里面的内容都只有寥寥数行代码、写sql不用在这里面吧?
<property name="configLocation">
<value>classpath:sql-map-config.xml</value>
</property>
<property name="mappingLocations">
<value>classpath*:com/wlgq/**/dao/ibatis/sql/*.xml</value>
</property>
sqlMapConfig.xml<sqlMapConfig>
<sqlMap resource="path/*.xml"/>
</sqlMapConfig>
这个文件里可以引用多个,LZ你有必要用多个sqlMapConfig.xml吗?