<?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:p
="
http://www.springframework.org/schema/p
"
xsi:schemaLocation
="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
">
<!--
创建数据源
-->
<
property
name
="
driverClassName
"
value
="
com.mysql.jdbc.Driver
" />
<
property
name
="
url
"
value
="
jdbc:mysql://localhost:3306/votemanager
" />
<
property
name
="
username
"
value
="
root
" />
<
property
name
="
password
"
value
="
accp
" />
</
bean
>
<!--
创建SessionFactory
-->
<
ref
bean
="
dataSource
" />
</
property
>
<
prop key
="
hibernate.dialect
">
org.hibernate.dialect.MySQLDialect
</
prop
>
<
prop key
="
hibernate.show_sql
">
true
</
prop
>
</
props
>
</
property
>
<
value
>
net/y2t70/testssh/entity/VoteItem.hbm.xml
</
value
>
<
value
>
net/y2t70/testssh/entity/VoteOption.hbm.xml
</
value
>
<
value
>
net/y2t70/testssh/entity/VoteSubject.hbm.xml
</
value
>
<
value
>
net/y2t70/testssh/entity/VoteUser.hbm.xml
</
value
>
</
list
>
</
property
>
</
bean
>
<
property
name
="
sessionFactory
"
ref
="
factory
" />
</
bean
>
<
property
name
="
voteUserDao
"
ref
="
userDao
" />
</
bean
>
<
bean
id
="
logAdivce
"
class
="
net.y2t70.testssh.advice.LogAdvice
" />
<
bean
id
="
endAdivce
"
class
="
net.y2t70.testssh.advice.EndAdvice
" />
<
value
>
net.y2t70.testssh.biz.VoteUserBiz
</
value
>
</
property
>
<
value
>
logAdivce
</
value
>
<
value
>
endAdivce
</
value
>
</
list
>
</
property
>
<
property
name
="
target
"
ref
="
userBizTarget
" />
</
bean
>
<
property
name
="
voteUserBiz
"
ref
="
userBiz
" />
</
bean
>
- <!--
<bean id="userDao" class="net.y2t70.testssh.dao.impl.VoteUserDaoImpl"> <property name="sessionFactory" ref="factory" /> </bean> <bean id="userBiz" class="net.y2t70.testssh.biz.impl.VoteUserBizImpl"> <property name="voteUserDao" ref="userDao" /> </bean> <bean id="userAction" class="net.y2t70.testssh.web.action.VoteUserAction"> <property name="voteUserBiz" ref="userBiz" /> </bean>-->
</
beans
>