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>  
评论
发表评论

您还没有登录,请登录后发表评论

zaife
搜索本博客
我的相册
A826bd78-d40f-4806-a981-9effd9f6bc45-thumb
2006国米全家福
共 3 张
最近加入圈子
存档
最新评论