spring+hibernate+struts2+compass整合(四)

2014-11-24 07:34:31 · 作者: · 浏览: 4

56
57 58 init-method="start" destroy-method="stop">
59
60
61
62 63 class="org.compass.spring.device.SpringSyncTransactionGpsDeviceWrapper">
64
65

66
67
68
69
70
71 72 class="org.compass.core.CompassTemplate">
73
74

75
76
77 78 class="com.v512.example.service.impl.CompassIndexBuilder"
79 lazy-init="false">
80
81
82
83

84
85
86
87

/compass1/WebRoot/WEB-INF/applicationContext.xml
1 < xml version="1.0" encoding="UTF-8" >
2 http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:aop="http://www.springframework.org/schema/aop"
5 xmlns:tx="http://www.springframework.org/schema/tx"
6 xsi:schemaLocation="
7 http://www.springframework.org/schema/beans
8 http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
9 http://www.springframework.org/schema/tx
10 http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
11 http://www.springframework.org/schema/aop
12 http://www.springframework.org/schema/aop/spring-aop-2.5.xsd" default-lazy-init="true">
13
14
15
16 17 class="org.apache.commons.dbcp.BasicDataSource">
18 19 value="oracle.jdbc.driver.OracleDriver">
20

21 22 value="jdbc:oracle:thin:@192.168.1.3:1521:ora9">
23

24
25
26

27
28
29 30 class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
31
32
33

34
35
36
37 org.hibernate.dialect.Oracle9Dialect
38

39
40
41 org.hibernate.cache.EhCacheProvider
42

43
44 true
45
46 true
47

48
49
50
51
52 com/v512/example/model/Product.hbm.xml
53

54

55

56
57
58
59
60

61
62
63
64

65
66
67
68
69

70
71
72
73
74
75
76

77

78
79
80
81
82
83
84
85
86

87

88
89
90
91
92
93

94
95
96

/compass1/WebRoot/WEB-INF/web.xml
1 < xml version="1.0" encoding="UTF-8" >
2 3 xmlns="http://java.sun.com/xml/ns/javaee"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
6 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
7
8
9
10 contextConfigLocation
11 /WEB-INF/applicationContext*.xml
12

13
14
15
16 org.springframework.web.context.ContextLoaderListener
17

18

19
20
21 lazyLoadingFilter
22
23 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
24

25

26
27
28
29 struts2
30