What is the simplest way to do settings files in Java?

前端 未结 8 1542
清歌不尽
清歌不尽 2021-01-03 05:47

Obviously enough, I want to avoid hardcoding paths and such into my application, and as a result, I\'d like to make a settings file that will store simple things like string

8条回答
  •  孤独总比滥情好
    2021-01-03 05:58

    If this is a web based application, you can add these as part of the environment variables (or custom properties) within the app server console/file.

    If it is a stand-alone application, a simple property file will suffice.

提交回复
热议问题