我尝试过使用。
@Value("#{'${white.listed.hotel.ids}'.split(',')}")
private Set<String> fareAlertwhiteListedHotelIds;
但是当 white.listed.hotel.ids 为空时,也要将其设置为空白值。
white.listed.hotel.ids =
请有人帮忙提供一个版本,在该版本中,whiteListedHotelIds 可以包含在属性文件中指定的值,或者在空白情况下没有项目。