回答編集履歴
6
convention-plugin
test
CHANGED
@@ -207,3 +207,13 @@
|
|
207
207
|
とりあえず struts.xml の記述か annotation での記述かどっちかで統一してみましょう。
|
208
208
|
|
209
209
|
何かココらへんが原因なきがしてきた。
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
# Struts2-convention-plugin の設定
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
[公式サイト](https://struts.apache.org/docs/convention-plugin.html) をみてください。
|
218
|
+
|
219
|
+
長いのです
|
5
解決案 その1
test
CHANGED
@@ -197,3 +197,13 @@
|
|
197
197
|
|
198
198
|
|
199
199
|
でいいとおもいますがどうでしょう?
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
# 解決案
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
とりあえず struts.xml の記述か annotation での記述かどっちかで統一してみましょう。
|
208
|
+
|
209
|
+
何かココらへんが原因なきがしてきた。
|
4
競合回避案1
test
CHANGED
@@ -153,3 +153,47 @@
|
|
153
153
|
"http://struts.apache.org/dtds/struts-2.5.dtd">
|
154
154
|
|
155
155
|
```
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
## 競合回避
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
### 変更前
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
```
|
168
|
+
|
169
|
+
@InterceptorRefs({
|
170
|
+
|
171
|
+
@InterceptorRef(value="scopedModelDriven",params={"scope","session"}),
|
172
|
+
|
173
|
+
@InterceptorRef("defaultStack")
|
174
|
+
|
175
|
+
})
|
176
|
+
|
177
|
+
```
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
### 変更後
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
```
|
186
|
+
|
187
|
+
@InterceptorRefs({
|
188
|
+
|
189
|
+
@InterceptorRef("defaultStack"),
|
190
|
+
|
191
|
+
@InterceptorRef(value="scopedModelDriven",params={"scope","session"})
|
192
|
+
|
193
|
+
})
|
194
|
+
|
195
|
+
```
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
でいいとおもいますがどうでしょう?
|
3
struts-default\.xml の定義
test
CHANGED
@@ -1,4 +1,74 @@
|
|
1
1
|
`ProModel` クラスが `java.io.Serializable` インタフェース を実装していないからだと思いますが
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
## 追記
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
その設定だと以下の順序になるんで競合しているんじゃないんですか?
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
```xml
|
14
|
+
|
15
|
+
<interceptor-ref name="scopedModelDriven">
|
16
|
+
|
17
|
+
<!-- あなたが設定した インターセプター -->
|
18
|
+
|
19
|
+
<param name="scope">session</param>
|
20
|
+
|
21
|
+
</interceptor-ref>
|
22
|
+
|
23
|
+
<interceptor-ref name="exception"/>
|
24
|
+
|
25
|
+
<interceptor-ref name="alias"/>
|
26
|
+
|
27
|
+
<interceptor-ref name="servletConfig"/>
|
28
|
+
|
29
|
+
<interceptor-ref name="i18n"/>
|
30
|
+
|
31
|
+
<interceptor-ref name="prepare"/>
|
32
|
+
|
33
|
+
<interceptor-ref name="chain"/>
|
34
|
+
|
35
|
+
<!-- 標準のインターセプター -->
|
36
|
+
|
37
|
+
<interceptor-ref name="scopedModelDriven"/>
|
38
|
+
|
39
|
+
<interceptor-ref name="modelDriven"/>
|
40
|
+
|
41
|
+
<interceptor-ref name="fileUpload"/>
|
42
|
+
|
43
|
+
<interceptor-ref name="checkbox"/>
|
44
|
+
|
45
|
+
<interceptor-ref name="datetime"/>
|
46
|
+
|
47
|
+
<interceptor-ref name="multiselect"/>
|
48
|
+
|
49
|
+
<interceptor-ref name="staticParams"/>
|
50
|
+
|
51
|
+
<interceptor-ref name="actionMappingParams"/>
|
52
|
+
|
53
|
+
<interceptor-ref name="params"/>
|
54
|
+
|
55
|
+
<interceptor-ref name="conversionError"/>
|
56
|
+
|
57
|
+
<interceptor-ref name="validation">
|
58
|
+
|
59
|
+
<param name="excludeMethods">input,back,cancel,browse</param>
|
60
|
+
|
61
|
+
</interceptor-ref>
|
62
|
+
|
63
|
+
<interceptor-ref name="workflow">
|
64
|
+
|
65
|
+
<param name="excludeMethods">input,back,cancel,browse</param>
|
66
|
+
|
67
|
+
</interceptor-ref>
|
68
|
+
|
69
|
+
<interceptor-ref name="debugging"/>
|
70
|
+
|
71
|
+
```
|
2
72
|
|
3
73
|
|
4
74
|
|
2
かんけいないはずだけど struts-dtd 対応追記
test
CHANGED
@@ -1 +1,85 @@
|
|
1
1
|
`ProModel` クラスが `java.io.Serializable` インタフェース を実装していないからだと思いますが
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
## 一応 DTD 対応
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
### Struts 2.0.0+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
```xml
|
14
|
+
|
15
|
+
<!DOCTYPE struts PUBLIC
|
16
|
+
|
17
|
+
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
|
18
|
+
|
19
|
+
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
20
|
+
|
21
|
+
```
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
### Struts 2.1.x
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
```xml
|
30
|
+
|
31
|
+
<!DOCTYPE struts PUBLIC
|
32
|
+
|
33
|
+
"-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
|
34
|
+
|
35
|
+
"http://struts.apache.org/dtds/struts-2.1.dtd">
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
### Struts 2.1.7+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
```xml
|
46
|
+
|
47
|
+
<!DOCTYPE struts PUBLIC
|
48
|
+
|
49
|
+
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
|
50
|
+
|
51
|
+
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
|
52
|
+
|
53
|
+
```
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
### Struts 2.3.0+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
```xml
|
62
|
+
|
63
|
+
<!DOCTYPE struts PUBLIC
|
64
|
+
|
65
|
+
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
|
66
|
+
|
67
|
+
"http://struts.apache.org/dtds/struts-2.3.dtd">
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
### Struts 2.5.0+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
```xml
|
78
|
+
|
79
|
+
<!DOCTYPE struts PUBLIC
|
80
|
+
|
81
|
+
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
|
82
|
+
|
83
|
+
"http://struts.apache.org/dtds/struts-2.5.dtd">
|
84
|
+
|
85
|
+
```
|
1
タイポ・・・・
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
`ProModel` クラスが `java.io.Serializable` インタフェース を実装していない
|
1
|
+
`ProModel` クラスが `java.io.Serializable` インタフェース を実装していないからだと思いますが
|