Closed GoogleCodeExporter closed 9 years ago
mybatis-spring-1.0.2
Original comment by Randy...@gmail.com
on 5 Dec 2011 at 1:07
Randy, please provide any extra info. I cannot understand if you are reporting
a bug or asking a question.
Thanks in advance!
Original comment by eduardo.macarron
on 5 Dec 2011 at 4:30
like in spring 2.5.5 configure file configLocations property configure list:
<bean id="sqlMapClientG4" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocations">
<list>
<value>config/g4/g4.sqlmap.xml</value>
<value>config/app/app.sqlmap.xml</value>
<!-- <value>config/app/other.sqlmap.xml</value>-->
</list>
</property>
<property name="dataSource" ref="dataSourceG4" />
</bean>
mybatis3-spring:
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="myDataSource" />
<!-- only assigned single configuration file-->
<property name="configLocation" value="classpath:configuration.xml"/>
</bean>
Original comment by Randy...@gmail.com
on 6 Dec 2011 at 1:57
Understood.
Use the "mapperLocations" property. It works in the same way.
Original comment by eduardo.macarron
on 6 Dec 2011 at 4:09
eduardo, "mapperLocations" does not work the same way as "configLocations". In
org.springframework.orm.ibatis.SqlMapClientFactoryBean, you could use
"configLocation" if you had one configuration,
"configLocations" if you had multiple configurations,
"mappingLocations" if you wanted to look for multiple mapping locations
In org.mybatis.spring.SqlSessionFactoryBean, the possibilities are
"configLocation" if you have one configuration, and
"mapperLocations" (equivalent to the old "mappingLocations").
It doesn't appear there is an equivalent to the old "configLocations", which
may be an issue if we want to convert from ibatis to mybatis.
Thanks,
Paul
Original comment by vonna...@gmail.com
on 10 Apr 2012 at 10:39
Original issue reported on code.google.com by
Randy...@gmail.com
on 5 Dec 2011 at 1:06