1.在
<if test="role.flightNo.tagList0.size()>0 and role.flightNo.tagList0[0]=='='">
中報異常Cause: java.lang.NumberFormatException: For input string: “=”
造成這個原因是將’='誤認爲char類型,而不是String類型
解決方案:
1.改爲:test=“role.flightNo.tagList0[0]==’=’.toString()”
2.原因是OGNL語法的問題:
這裏 ‘=’ 將被認爲是 char 類型,但是希望"=" 將被作爲 String類型。
所以我們可以用轉義:<if test="role.flightNo.tagList0[0]== "="">
3.或者將<if test="index == '='"> 改爲 <if test='index == "="'>
。