From 1e44e3cc618f4b655add6ecc171962a0e4ba8805 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 7 Apr 2023 16:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Program.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/IRaCIS.Core.API/Program.cs b/IRaCIS.Core.API/Program.cs index 7cd490da..2a048203 100644 --- a/IRaCIS.Core.API/Program.cs +++ b/IRaCIS.Core.API/Program.cs @@ -9,6 +9,8 @@ using IRaCIS.Core.Application.MediatR.Handlers; using System.Threading.Tasks; using MassTransit; using MassTransit.NewIdProviders; +using System.IO; + namespace IRaCIS.Core.API { @@ -17,6 +19,16 @@ namespace IRaCIS.Core.API public readonly string environment; public static async Task Main(string[] args) { + + if(!File.Exists($@"C:\.xingcang\config.json ")) + { + Console.WriteLine("当前未注册"); + + return + } + + + try { //以配置文件为准,否则 从url中取环境值(服务以命令行传递参数启动,配置文件配置了就不需要传递环境参数)