MiniDao整合方案
freemarker模板引擎
Spring(IOC,AOP,JDBC)
Hibernate
?下载地址:http://code.google.com/p/jeecg/downloads/list
?
3.???? 整合步骤
org.jeecgframework.minidao-版本号.jar
....待补充
?
<!-- MiniDao动态代理类 -->
<bean id="miniDaoHandler" class="org.jeecgframework.minidao.aop.MiniDaoHandler">
<!-- 如果没用使用jdbcTemplate,还需要首先配置jdbcTemplate的bean-->
<property name="jdbcTemplate" ref="jdbcTemplate"></property>
</bean>
?
????????? spring容器中注册自定义Dao
<!-- 注册自定义Dao接口 -->
<bean id="自定义Dao的ID" class="org.springframework.aop.framework.ProxyFactoryBean">
<!-- 配置自定义DAO的接口 -->
<property name="proxyInterfaces" value="自定义DAO接口的全路径" />
??? <property name="interceptorNames">
??? <list>
<!-- MiniDao的动态代理类ID -->
?????? <value>miniDaoHandler</value>
??? </list>
</property>
</bean>
<!-- JDBC配置 -->
??? <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
?????? <property name="dataSource">
?????????? <ref bean="dataSource" />
?????? </property>
??? </bean>
?
<!-- MiniDao动态代理类 -->
??? <bean id="miniDaoHandler" class="org.jeecgframework.minidao.aop.MiniDaoHandler">
?????? <property name="jdbcTemplate" ref="jdbcTemplate"></property>
??? </bean>
<!-- 注册employeeDao接口 -->
??? <bean id="employeeDao" class="org.springframework.aop.framework.ProxyFactoryBean">
?????? <property name="proxyInterfaces" value="examples.dao.EmployeeDao" />
?????? <property name="interceptorNames">
?????????? <list>
????????????? <value>miniDaoHandler</value>
?????????? </list>
?????? </property>
??? </bean>
?