zoukankan      html  css  js  c++  java
  • portlet 使用spring jdbcTemplate


    <?xml version="1.0" encoding="UTF-8"?>
    <beans
        
    xmlns="http://www.springframework.org/schema/beans"
        xmlns:aop
    ="http://www.springframework.org/schema/aop"
        xmlns:context
    ="http://www.springframework.org/schema/context"
        xmlns:tx
    ="http://www.springframework.org/schema/tx"
        xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation
    ="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
        
        
    <!-- 配置使用注解 -->
        
    <context:annotation-config />
        
    <!-- -->
        
    <bean id="liferayDataSource" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
            
    <property name="targetDataSource">
                
    <bean class="com.liferay.portal.kernel.util.InfrastructureUtil" factory-method="getDataSource" />
            
    </property>
        
    </bean>
        
        
    <bean id="jdbcTemplate"  class="org.springframework.jdbc.core.JdbcTemplate"> 
            
    <property name="dataSource"><ref bean="liferayDataSource"/></property> 
        
    </bean> 

        
         
    <bean id="computerEntryService" class="cn.net.comsys.portlet.ShowNew.service.impl.ComputerEntryServiceImpl"/>
    </beans>
  • 相关阅读:
    hibernate和ibatis的区别
    [转] hibernate和ibatis的对比
    如何理解java的引用传递
    代理模式与装饰器模式的区别
    j2ee的异步消息机制
    什么是j2ee ??EJB与j2ee的关系?? 请看百度百科
    spring事务的传播性的理解
    Hibernate与IBatis的优缺点及可行性分析
    jQuery插件实现的方法和原理简单说明
    iReport使用教程
  • 原文地址:https://www.cnblogs.com/jifeng/p/2115739.html
Copyright © 2011-2022 走看看