1. Introduction
1. Reading configuration files is a very frequently used operation during development. The genus "can't write to death"
Second, NetCore reads the configuration file
1. Create a new static public variable, which is called a singleton.
2. When the program Startup starts, pass the system variable to the singleton.
3. Add configuration information. The netcore configuration file is a standard json file, and children are read with: separated, please see the example.
4. Use a singleton to read the configuration content in the api.
The amount of code is small, and the map is directly attached, without the code.
Add configuration section
running result