控制台增加logo
This commit is contained in:
parent
aad5760289
commit
b4772a4153
23
ZR.Admin.WebApi/Extensions/LogoExtension.cs
Normal file
23
ZR.Admin.WebApi/Extensions/LogoExtension.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using ZR.Common;
|
||||
|
||||
namespace ZR.Admin.WebApi.Extensions
|
||||
{
|
||||
public static class LogoExtension
|
||||
{
|
||||
public static void AddLogo(this IServiceCollection services)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Blue;
|
||||
var contentTpl = JnHelper.ReadTemplate("", "logo.txt");
|
||||
var content = contentTpl.Render();
|
||||
|
||||
Console.WriteLine(content);
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("源码地址: https://gitee.com/izory/ZrAdminNetCore");
|
||||
Console.WriteLine("官方文档:http://www.izhaorui.cn/doc");
|
||||
Console.WriteLine("打赏作者:http://www.izhaorui.cn/doc/support.html");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -80,6 +80,8 @@ builder.Services.AddMvc(options =>
|
||||
});
|
||||
|
||||
builder.Services.AddSwaggerConfig();
|
||||
// 显示logo
|
||||
builder.Services.AddLogo();
|
||||
|
||||
var app = builder.Build();
|
||||
InternalApp.ServiceProvider = app.Services;
|
||||
|
||||
7
ZR.Admin.WebApi/wwwroot/logo.txt
Normal file
7
ZR.Admin.WebApi/wwwroot/logo.txt
Normal file
@ -0,0 +1,7 @@
|
||||
___________ _ _ _ _ ______ _______
|
||||
|___ / __ \ /\ | | (_) | \ | | ____|__ __|
|
||||
/ /| |__) | / \ __| |_ __ ___ _ _ __ | \| | |__ | |
|
||||
/ / | _ / / /\ \ / _` | '_ ` _ \| | '_ \ | . ` | __| | |
|
||||
/ /__| | \ \ / ____ \ (_| | | | | | | | | | |_| |\ | |____ | |
|
||||
/_____|_| \_\/_/ \_\__,_|_| |_| |_|_|_| |_(_)_| \_|______| |_|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user