首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

SSH2调整要点

2012-10-09 
SSH2整合要点关于spring配置文件要点?xml version1.0 encodingUTF-8?beans xmlnshttp://www.sp

SSH2整合要点
关于spring配置文件要点
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx  
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

<bean value="jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=utf-8"></property>
<property name="username" value="root"></property>
<property name="password" value="123"></property>
</bean>
<bean id="sessionFactory"
/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="show_sql">true</prop>
<prop key="format_sql">true</prop>
<prop key="current_session_context_class">thread</prop>

</props>
</property>
<property name="annotatedClasses">
<list>
<value>com.juyuanjia.model.User</value>
</list>
</property>
</bean>

<bean id="userDao"
ref="sessionFactory"></property>
</bean>

<bean id="registerAction" scope="prototype">
<property name="userDao" ref="userDao" />
</bean>


<bean id="transactionManager"
ref="sessionFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>




关于Struts2要点
<constant name="struts.objectFactory" value="spring" />


热点排行