spring.ftl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. [#ftl]
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <!--
  4. This file is auto generated by Ant & FreeMarker.
  5. DO NOT MODIFY IT.All modified content will be lost when next auto generate.
  6. 这个文件是用ANT和FreeMarker自动生成的。
  7. 不要修改此文件。所有改动将在下次重新自动生成时丢失。
  8. -->
  9. <beans xmlns="http://www.springframework.org/schema/beans"
  10. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
  11. xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
  12. xmlns:context="http://www.springframework.org/schema/context"
  13. xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
  14. default-autowire="byName">
  15. [#--
  16. <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
  17. <property name="configLocation" value="${sqlmapConfigPackageName}/SqlMap_Config.xml" />
  18. <property name="dataSource" ref ="${r"${dataSource}"}" />
  19. </bean>
  20. --]
  21. <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
  22. <property name="dataSource" ref="dataSource" />
  23. <property name="configLocation" value="classpath:SqlMapConfig.xml" />
  24. </bean>
  25. [#list tables as table]
  26. <bean id="${table.className?uncap_first}Dao" class="org.mybatis.spring.mapper.MapperFactoryBean">
  27. <property name="mapperInterface" value="${daoPackageName}.${table.className}Dao" />
  28. <property name="sqlSessionFactory" ref="sqlSessionFactory" />
  29. </bean>
  30. [/#list]
  31. </beans>