该用户从未签到
|
' D6 x- |6 R2 q3 Q* h
P) O/ I0 `0 ^; \6 R$ {% b# v% C3 H+ T$ R/ c% R
<!-- 定义数据源 -->
6 U/ u( I' X( C! o; s6 q <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">) ~. i! D$ d$ Q. F
<property name="driverClassName">
1 W! O& y) i! M4 P <value>com.mysql.jdbc.Driver</value>
6 S% g, j0 s: G3 d" X! Q </property>" E6 E0 d# Q! r& Z% @$ a* ?( s& ?
<property name="url">
! x4 w# Y0 ^8 w <value>jdbc:mysql://localhost/bfblog</value>1 e4 G! a k. i6 `
</property>' Z; r. t% x: X, o- R3 a* S
<property name="username">
" Z5 w5 [$ j' c O <value>root</value>
' C* p/ X% A, I5 T </property>
- h5 ]8 C( v2 y* L# e9 _ <property name="password">$ N& A6 z& M9 G% z
<value>admin</value>
1 k8 L1 z' N' V9 q) K </property>
C; `' y# h9 a. c3 k4 U* r </bean>
$ y7 k R9 e5 n/ z* [ ) v9 V( t5 @& p; t) G; h* d
<!-- 定义SessionFactory -->- j# ^3 @/ }4 q# s+ s
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
/ s+ c# h. w* c% ] <property name="dataSource">; S- ]7 H2 M. W d. @4 s" B
<ref bean="dataSource"/>% i2 H/ r! P* |% t6 }
</property>- J! k6 h0 N. M4 c2 z. B3 I
<property name="hibernateProperties">( I0 ^5 L# T% ^
<props>
8 K+ e8 o6 K4 T0 b# a% y <prop key="hibernate.dialect">
% M9 n% f' r- [8 T2 E org.hibernate.dialect.MySQLDialect2 ]- z1 U( o! Y( r6 m- [- X$ @* j
</prop>- d! J4 T# y* v7 s/ a
<prop key="hibernate.show_sql">false</prop>! j7 d5 v! ~5 q) \( \7 w" p
</props>
' U( e0 r0 t; p% n1 I# _; { </property>- @6 @% z d9 s. f4 m! g9 k. J W/ H
<property name="mappingResources">
; C8 V, B- _& S: W+ N( s. C, a <list>
" |( l/ j# ?" J <value>com/ibeifeng/po/User.hbm.xml</value>- B9 g* P! ]( e$ ]4 h
</list>& ?+ d) I5 t& J; F q
</property>
# V; R, h0 H6 l. G </bean> |
|