……
@Repository("crud.mybatis.auto_dao.itemDAO")
public interface I_ItemDAO extends
tfw.integration_demo._04_spring_web_mvc._02_crud._01_basic_jdbc_crud.dao.I_ItemDAO
{
/**
* ……
*/
List<Item> listByRange(@Param("start_row_index") int intStartRowIdx,
@Param("select_row_count") int intSelectRowCount)
throws SQLException;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
"http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
<mapper namespace="tfw.integration_demo._04_spring_web_mvc._02_crud._03_mybatis_crud._02_auto_dao_way.dao.I_ItemDAO">
……
</mapper>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE ……> <configuration> <!-- Connection and transaction parameters: --> <environments ……> …… </environments> <!-- Mappers: --> <mappers> <!-- <mapper resource=".../.../XXXMapping.xml"/> <mapper resource=".../.../YYYMapping.xml"/> --> …… <mapper resource="tfw/integration_demo/_04_spring_web_mvc/_02_crud/_03_mybatis_crud/_02_auto_dao_way/dao/impl/oracle/User.mybatis_mapping.xml"/> <mapper resource="tfw/integration_demo/_04_spring_web_mvc/_02_crud/_03_mybatis_crud/_02_auto_dao_way/dao/impl/oracle/Item.mybatis_mapping.xml"/> </mappers> </configuration>
<?xml version="1.0" encoding="UTF-8"?> <beans ……> …… <bean id="crud.mybatis.urlMapping" ……> …… </bean> <!-- [########################################] --> <bean id="crud.mybatis.auto_dao.msc" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!-- <property name="sqlSessionFactory" ref="crud.mybatis.manual_dao.ssf"/> --> <property name="sqlSessionFactory" ref="crud.mybatis.auto_dao.ssf"/> <property name="basePackage" value="tfw.integration_demo._04_spring_web_mvc._02_crud._03_mybatis_crud._02_auto_dao_way.dao"/> </bean> <bean id="crud.mybatis.auto_dao.ssf" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="ds"/> <!-- <property name="mapperLocations" value="classpath:tfw/integration_demo/_04_spring_web_mvc/_02_crud/_03_mybatis_crud/_02_auto_dao_way/dao/impl/oracle/User.mybatis_mapping.xml"/> --> <property name="mapperLocations"> <array> <value>classpath:tfw/integration_demo/_04_spring_web_mvc/_02_crud/_03_mybatis_crud/_02_auto_dao_way/dao/impl/oracle/User.mybatis_mapping.xml</value> <value>classpath:tfw/integration_demo/_04_spring_web_mvc/_02_crud/_03_mybatis_crud/_02_auto_dao_way/dao/impl/oracle/Item.mybatis_mapping.xml</value> </array> </property> </bean> <bean id="crud.mybatis.auto_dao.userMgrSvc" ……> …… </bean> …… </beans>
<?xml version="1.0" encoding="UTF-8"?> <beans ……> …… <bean id="crud.mybatis.auto_dao.userMgrCtrl" …… …… </bean> <!-- [########################################] --> <bean id="crud.mybatis.auto_dao.itemMgrSvc" class="tfw.integration_demo._04_spring_web_mvc._02_crud._01_basic_jdbc_crud.service._02_ItemMgrService"> <property name="itemDAO" ref="crud.mybatis.auto_dao.itemDAO"/> </bean> </beans>
<?xml version="1.0" encoding="UTF-8"?> <beans ……> …… <bean id="crud.mybatis.auto_dao.itemMgrSvc" ……> …… </bean> <bean id="crud.mybatis.auto_dao.itemMgrCtrl" class="tfw.integration_demo._04_spring_web_mvc._02_crud._01_basic_jdbc_crud.controller._02_ItemMgrController"> <property name="itemMgrSvc" ref="crud.mybatis.auto_dao.itemMgrSvc"/> <property name="pageTitle" value="Integration&nbsp;Demo / 04&nbsp;Spring&nbsp;Web&nbsp;MVC / 02&nbsp;Create,&nbsp;Read,&nbsp;Update&nbsp;&amp;&nbsp;Discard / 03&nbsp;MyBatis&nbsp;CRUD / 02&nbsp;Auto&nbsp;DAO&nbsp;Way / 02&nbsp;Item&nbsp;Management - "/> <property name="jumpTarget"> <props> <prop key="result">/WEB-INF/pages/tfw/integration_demo/04_spring_web_mvc/02_crud/01_basic_jdbc_crud/02_item_mgr/result.jsp</prop> <prop key="detail">/WEB-INF/pages/tfw/integration_demo/04_spring_web_mvc/02_crud/01_basic_jdbc_crud/02_item_mgr/detail.jsp</prop> <prop key="list">/WEB-INF/pages/tfw/integration_demo/04_spring_web_mvc/02_crud/01_basic_jdbc_crud/02_item_mgr/list.jsp</prop> </props> </property> </bean> </beans>
<?xml version="1.0" encoding="UTF-8"?> <beans ……> …… <bean id="crud.mybatis.manual_dao.userMgrCtrl" ……> …… </bean> <bean id="crud.mybatis.urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/tfw/integration_demo/04_spring_web_mvc/02_crud/03_mybatis_crud/01_manual_dao_way/01_user_mgr/action.spr">crud.mybatis.manual_dao.userMgrCtrl</prop> <prop key="/tfw/integration_demo/04_spring_web_mvc/02_crud/03_mybatis_crud/02_auto_dao_way/01_user_mgr/action.spr">crud.mybatis.auto_dao.userMgrCtrl</prop> <prop key="/tfw/integration_demo/04_spring_web_mvc/02_crud/03_mybatis_crud/02_auto_dao_way/02_item_mgr/action.spr">crud.mybatis.auto_dao.itemMgrCtrl</prop> </props> </property> </bean> <!-- [########################################] --> <bean id="crud.mybatis.auto_dao.msc" ……> …… </bean> …… </beans>