Make Java Properties available across classes?

前端 未结 8 2250
情深已故
情深已故 2020-12-30 08:16

I chose to take properties file for customization of some settings. I use the following code to make a Properties Object available in a class

Properties defa         


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-30 08:30

    Load the properties once using and store the Properties somewheres that others classes can pull from. If that is a MyProperties class that references a static variable somewhere that is fine.

提交回复
热议问题