During web development, some general configuration information is often placed in config.properties in the form of kv, such as database information, as shown below:
Then load the configuration file config.properties in the code, and take out the defined configuration information one by one. Here are two methods:
The first: