Ctrip's Apollo configuration center is quickly integrated in the. NET Core project.

Source: Internet
Author: User

Ctrip's Apollo configuration center is quickly integrated in the. NET Core project.

. NET Core support documentation for general reference documentation. Net client User Guide: https://github.com/ctripcorp/apollo/wiki/.Net%E5% AE %A2%E6%88%B7%E7% AB %AF%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97

Log on to Apollo to create an App and related configuration items. You can refer to the following Configuration:

Introduce the dependency of Com. Ctrip. Framework. Apollo. Configuration on Nuget.

Configure the app. id set above on the project. Note that this is achieved by creating the appsettings. json file.

{
"Apollo ":{
"AppId": "SampleApp ",
"MetaServer": "http: // 111.230.101.173: 8080"
}
}

AppId is the unique id used to identify an application.

The Apollo client obtains the configuration from different servers for different environments. MetaServer is the server configuration that the client obtains the configuration.

These two are required parameters, and optional parameters can be set.

Our. NET Core configuration system is perfect, and the. NET Core component of Apollo also uses this configuration system.

Let's take a look at the program running effect:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.