该用户从未签到
|
: @' y$ N% Z7 D2 j) Z* j/ x- u4 l6 _, C4 t! b
1 n$ K- x' G) Z4 C# j1 B
<!-- 定义数据源 -->
% t5 _% u9 p" |1 | <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">& o2 V( [1 s v
<property name="driverClassName">
9 W- _; O6 J9 p+ Y1 ]" D' j <value>com.mysql.jdbc.Driver</value>
8 \( z2 L4 q! J a z' A; S </property>3 c* f7 O2 b/ r0 a; r5 b9 B* W
<property name="url">7 z! X% M6 r% Z9 y" N
<value>jdbc:mysql://localhost/bfblog</value>
- {, I' X: ~2 r9 _3 v </property>
0 L9 L1 S5 I I <property name="username">7 {0 c0 `0 L, y8 S
<value>root</value>4 U* s- A: T$ z* f6 x' f
</property>
" R& [$ n t3 \" g+ u C9 y8 A <property name="password">
& C/ L0 G. l5 x8 W) P9 Z) k0 z! j( P2 w <value>admin</value>
/ Z. M# `' X' W3 s" A9 O </property>
" q1 i' A6 n. T" n! c, g: _+ y </bean># S4 o/ f ?* _8 F
" ^1 Q# J& b: G) A& N; b/ o <!-- 定义SessionFactory -->
: A* J' J8 F9 O/ i' u <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
! T0 g- t2 e+ C; c( M) W; ^ <property name="dataSource">1 z2 ]: F: ], p6 | [! F
<ref bean="dataSource"/>$ T/ k5 S1 O" W9 Q7 v0 [" K( i Y0 v/ ~9 _
</property>1 G7 v4 ?1 ]7 b& j* X
<property name="hibernateProperties">
! F" F) l' }! r1 ?: N <props>1 i. \! Y" }6 G% ?" O
<prop key="hibernate.dialect">5 g: F0 [- ?/ b+ E( A; ?
org.hibernate.dialect.MySQLDialect
2 Q7 c! Q, U* @/ i! E) H0 H </prop>
6 r K% p @6 V3 @1 x3 c$ Z* l# W2 i- ? <prop key="hibernate.show_sql">false</prop>
$ |! H& | p3 J </props>& D1 D9 Z: v' E
</property>
" n5 F5 b9 Z0 k9 K7 j7 V <property name="mappingResources">$ M7 N& a& Y% \% }: ?$ z/ L% ?
<list># a3 W7 _( o/ X( q: y( A
<value>com/ibeifeng/po/User.hbm.xml</value>
! d/ B- H5 g9 Z% i0 w3 s7 A) l, V </list>- H- k" j9 A0 @( d* A" w
</property>: c% c/ |7 B- s8 t8 @" w' M# l& N
</bean> |
|