首页 > 移动平台 > 详细

第五篇,app.config文件配置

时间:2020-03-31 11:19:09      阅读:70      评论:0      收藏:0      [点我收藏+]
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration><configSections><!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="serviceManager" type="Core.Consul.ServiceManagerSection,0.Core" />
</configSections>
<!--注册consul-->
<serviceManager address="http://192.168.1.111:8500/" register="false" service="sxf" ip="192.168.5.218" port="9988" token="245d0a09-7139-bbea-aadc-ff170a0562b1" />
<connectionStrings>

</connectionStrings>


 

 

</configuration>

根据前几篇的设置搭建后,在项目中的app.config文件里加入 serviceManager ,其中 address是 consul的地址, register 是否注册consul,service是 注册consul的服务名称 ,ip是当前系统发布后的ip地址 ,port是当前系统发布后的端口,token是 consul注册acl配置中的token。

 

如果不懂扫微信交流

技术分享图片

 

 

第五篇,app.config文件配置

原文:https://www.cnblogs.com/iversonlzy/p/12603314.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!