[英]Dozer mapping Booleans
我正在使用推土機,但無法從布爾值映射到布爾值。 可能是什么問題呢?
映射xhtml
<field>
<a>test</a>
<b is-accessible="true" >test2</b>
</field>
A級
private boolean test;
public boolean getTest(){
return test;
}
B級
private Boolean test2;
public boolean isTest2(){
return test2;
}
使用推土機5.4.0,以下對我有用
<field>
<a is-accessible="true" get-method="isFoo">foo</a>
<b is-accessible="true" set-method="setFoo">foo</b>
</field>
根據推土機上的文檔 ,這應該是可能的:
數據類型覆蓋由Dozer映射引擎自動執行。 當前,推土機支持以下類型的轉換:(這些都是雙向的)
- 原始包裝到原始包裝
- ...
您可以嘗試指定set-method和get-method help 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.