Naming convention for properties in property file

后端 未结 7 1299
感情败类
感情败类 2021-02-03 20:05

What are the naming conventions for property names defined in properties files in Java? Can I use uppercase or only lowercase?

For example: bankAccountNumber or bank.acc

7条回答
  •  情歌与酒
    2021-02-03 20:23

    Actually Resource Bundle accepts only fully qualified base name of the bundle, with no file extension. In this case it will try to load the bundle of files like this

    messages/EN/properties.properties

    I am sure you intend something different than the conventional internationalization, but convention would have been "messages_en.properties" (en when language, EN when country)

提交回复
热议问题