叶落知秋

一叶落而知天下秋

统计

留言簿(1)

Java相关

阅读排行榜

评论排行榜

杂项


发表时间: 2007年11月07日



spring数据源配置

  1. <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"  singleton="true">  
  2.      <property name="jndiName">  
  3.          <value>tempDS</value>  
  4.      </property>  
  5. </bean>  

 

spring 整合 iBatis

  1. <bean id="sqlMapClient"  
  2.         class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">  
  3.     <property name="configLocation">  
  4.         <value>/WEB-INF/sql-map-config.xml</value>  
  5.     </property>  
  6.     <property name="dataSource" ref="dataSource" />  
  7. </bean>  

 

web.xml   中 spring (一种方式)

  1. <context-param>  
  2.     <param-name>contextConfigLocation</param-name>  
  3.     <param-value>  
  4.         /WEB-INF/spring-config-global.xml   
  5.     </param-value>  
  6. </context-param>  
  7.   
  8. <listener>  
  9.     <listener-class>  
  10.         org.springframework.web.context.ContextLoaderListener   
  11.     </listener-class>  
  12. </listener>  

posted on 2007-11-07 17:41 飞雪连天 阅读(62) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: