刚刚学习spring,找了段视频看看~想先配置下,不知道哪里错了(spring 1.2和2.0的差别?)
下面是我的配置文件applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>
<bean id="man" name="man_name" class="Man">
<property name="message"
value=" red">
</property>
</bean>
<!-- 声明一个hibernate3的事务管理器供代理使用 -->
<bean id="tansactonManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- DAO类 -->
<bean id="PuserDAO" class="com.red.spring.PuserDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!-- DAO代理类 -->
<bean id="PuserDAOProxy"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
//[b]说是没有setter in PuserDAOProxy[/b]
//[b]说是没有setter in PuserDAOProxy[/b]
PROPAGATION_REQUIRED
<!--
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED
PROPAGATION_REQUIRED,readOnly
PROPAGATION_REQUIRED,readOnly
PROPAGATION_REQUIRES_NEW
-->