Spring集成濾波器表達我有了允許值的列表的配置Bean:利用規劃環境地政司
@Component
public class Conf {
public List<String> getAllowedValues() {
return Arrays.asList("A", "B", "C", "D");
}
我已填充我的消息頭有一個叫做「someValue中」領域,我想用一個濾芯排除someValue不在允許值列表中的消息。
我的背景是這樣的:
<int:filter expression="#{conf.allowedValues}.contains(headers.get('someValue'))"/>
,但我得到:SpelParseException: EL1041E:(pos 1): After parsing a valid expression, there is still more data in the expression: 'comma(,)'