-
.
.
.
.
.
Jar
包配置
<
dep
endency
>
<
gro
upId
>
groupId
>
<
art
ifactId
>
spring-data-jpa
artifactId
>
<
version
>
$${n}
version
>
de
pendency
>
<
dependency
>
<
groupId
< br>>
groupId
>
<
artifactId
>
spring-data-commons-core
< br>
artifactId
>
<
p>
version
>
E
version
>
de
pendency
>
<
dependency
>
<
groupId
< br>>
commons-dbcp
groupId
>
<
art
ifactId
>
commons-dbcp
< br>
artifactId
>
<
p>
version
>
$${n}
version
>
<
p>
scope
>
runtime
scope
>
de
pendency
>
.
.
. .
.
.
.
.
.
<
dep
endency
>
<
gro
upId
>
ate
groupId
>
<
art
ifactId
>
hibernate-core
artifactId
>
<
version
>
$${n}
version
>
de
pendency
>
<
dependency
>
<
groupId
< br>>
ate
groupId<
/p>
>
<
artifactId
>
hibernate-entitymanager
artifactId
>
<
p>
version
>
$${n}
version
>
de
pendency
>
<
dependency
>
<
groupId
< br>>
ate
groupId<
/p>
>
<
artifactId
>
hibernate-ehcache
p>
artifactId
>
<
p>
version
>
$${n}
version
>
de
pendency
>
<
dependency
>
<
p>
groupId
>
$${d}
groupId
>
<
p>
artifactId
>
$${ctId}<
/p>
artifactId
>
<
version
>
$${n}
version
>
<
scope
>
runtime<
/p>
scope
>
dependency
>
.
.
. .
.
.
.
.
.
配置
配置命名空间
xml
version
=
< br>encoding
=
?>
<
beans
xmlns
=
xmlns:xsi
=
xmlns:aop
=<
/p>
xmlns:context
=
xmlns:jdbc
=
xmlns:tx
=
< br>
xmlns:jpa
=
p>
xsi:sc
hemaLocation
=
./schema/beans
./s
chema/beans/
./schema/aop
./sch
ema/aop/
./schema/context
.
/schema/context/
.
.
. .
.
.
.
.
.
./schema/jdbc
./sc
hema/jdbc/
./schema/tx
./sche
ma/tx/
./schema/data/jpa
.
g/schema/data/jpa/
default-lazy-
init
=
>
扫包配置
<
context:component-
scan
base-package
=
>
<
context:exclude-
filter
type
=
expression
=
/>
<
context:exclude-
filter
type
=
expression
=
ontrollerAdvice
/>
context:component-
scan
>
.
.
. .
.
.
.
.
.
Datasource
配置
<
context:property-
placeholder
ignore-
unresolvable
=
loc
ation
=
/>
<
bean
id
=
class
=
destroy-method
=
p>
>
<
property
name
=
value
=
/>
<
property
name
=
value
=
/>
<
property
name
=
value
=
/>
<
property
name
=
value
=
/>
bean
>
Entitymananger
配置
<
bean
id
=
p>
class
=
ge
rFactoryBean
>
.
.
. .