0

我放了一些我放入的属性文件(例如resources.propperties)

src/main/resources/com/ebiznext/agregation/service/payment/sips

目录,我试图在我的代码中检索它们,如下所示:

ResourceBundle resource = ResourceBundle.getBundle("com.ebiznext.aggregation.service.paiement.sips.resources", Locale.getDefault())

但我得到了例外:

Caused by MissingResourceException: Can't find bundle for base name com.ebiznext.aggregation.service.paiement.sips.resources, locale fr_FR
->> 1499 | throwMissingResourceException in java.util.ResourceBundle
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1322 | getBundleImpl    in     ''
|   1028 | getBundle . . .  in     ''

所以我的问题是在 Grails 中检索资源包的正确方法是什么?

4

0 回答 0