0
無論我嘗試什麼,這都會失敗。我在做什麼錯,在這裏?DWR - 不能馬歇爾枚舉?
package com.example
class ClassToMarshall{
SomeEnum myEnum
}
enum SomeEnum{
A,
B
}
resources.xml中:
<dwr:configuration>
<dwr:convert type="bean" class="com.example.**">
<dwr:exclude method="metaClass"/>
</dwr:convert>
<dwr:convert type="enum" class="com.example.SomeEnum">
<dwr:exclude method="metaClass"/>
</dwr:convert>
</dwr:configuration>
然而,當我打電話MyService.myMethod({myEnum: "A"})
,我收到Throwable throwable
。這是怎麼回事?