java.util.MissingResourceException: Can't find bundle for base name 'property_file name', locale en_US

后端 未结 9 1847
失恋的感觉
失恋的感觉 2020-12-09 07:30

I am trying to create a utility class ReadPropertyUtil.java for reading data from property file. While my class is located under a util directory , my sky

9条回答
  •  [愿得一人]
    2020-12-09 08:12

    I have just realized that my error was caused in the naming convention of my property file. When i used xxxx.xxxx.properties i got the error:

    java.util.MissingResourceException: Can't find bundle for base name 'property_file name', locale en_US

    Changing it to something like xxx-xxxx.properties works like a charm. Hope i help someone!

提交回复
热议问题