我有通過Spring配置的ReloadableResourceBundleMessageSource。一切工作正常。我想在資源包中添加更多的字符串,但是,我看到了UnknownFormatConversionException。Spring ReloadableResourceBundleMessageSource:查看UnknownFormatConversionException
我所要的輸出是:
Following filesystems are below threshold level (25%):/db
我的資源包已經
filesystemsBelowThreshold=Following filesystems are below threshold level {0}%:{1}
然而,上述格式不工作,它與
UnknownFormatConversionException: Conversion = ')'.
抱怨如果我刪除輪大括號,它抱怨着
UnknownFormatConversionException: Conversion = ':'.
我試着用另一種逃避%%,爲
filesystemsBelowThreshold=Following filesystems are below threshold level {0}%%:{1}
,不過,我得到UnknownFormatConversionException: Conversion = ':'.
任何想法,我該如何解決這個問題?
嘗試轉義:由\: –
我認爲=和:屬性文件中的特殊字符 –
@SRT_KP:這是行不通的。我更改爲'filesystemsBelowThreshold =以下文件系統低於閾值級別{0}%\:{1}',但是我仍然得到相同的錯誤,即'UnknownFormatConversionException:Conversion =':''。 – devang