diff --git a/src/modules/admin/ZhonTai.Host/Program.cs b/src/modules/admin/ZhonTai.Host/Program.cs
index 0dad6775..0fb4ba80 100644
--- a/src/modules/admin/ZhonTai.Host/Program.cs
+++ b/src/modules/admin/ZhonTai.Host/Program.cs
@@ -2,9 +2,9 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
-using Savorboard.CAP.InMemoryMessageQueue;
using System;
using System.Reflection;
+using Savorboard.CAP.InMemoryMessageQueue;
using ZhonTai.Admin.Core;
using ZhonTai.Admin.Core.Configs;
using ZhonTai.Admin.Core.Consts;
@@ -56,8 +56,8 @@
config.UseInMemoryStorage();
config.UseInMemoryMessageQueue();
- //
- //
+ //
+ //
//config.UseMySql(dbConfig.ConnectionString);
//config.UseRabbitMQ(mqConfig => {
diff --git a/templates/admin/content/README.md b/templates/admin/content/README.md
index 97538119..1ffe5b6a 100644
--- a/templates/admin/content/README.md
+++ b/templates/admin/content/README.md
@@ -1,5 +1,5 @@
-Admin项目模板说明
+MyApp接口项目模板说明
*********************************************************
@@ -25,7 +25,7 @@ dotnet new install ZhonTai.Template
```
安装本地
```
-dotnet new install F:\zhontai\Admin.Core\templates\ZhonTai.Template.3.7.1.nupkg
+dotnet new install F:\zhontai\Admin.Core\templates\ZhonTai.Template.8.6.0.nupkg
```
### 创建项目
diff --git a/templates/admin/content/src/MyApp.Host/Program.cs b/templates/admin/content/src/MyApp.Host/Program.cs
index bd7ff65c..e6298946 100644
--- a/templates/admin/content/src/MyApp.Host/Program.cs
+++ b/templates/admin/content/src/MyApp.Host/Program.cs
@@ -122,8 +122,8 @@ void OnExecuting(TaskInfo task)
config.UseInMemoryStorage();
config.UseInMemoryMessageQueue();
- //
- //
+ //
+ //
//config.UseMySql(dbConfig.ConnectionString);
//config.UseRabbitMQ(mqConfig => {
diff --git a/templates/admin/templates.nuspec b/templates/admin/templates.nuspec
index cd6b761c..032faee0 100644
--- a/templates/admin/templates.nuspec
+++ b/templates/admin/templates.nuspec
@@ -11,8 +11,8 @@
Copyright ©2020 zhontai
- 中台Admin模板,前后端分离的权限管理系统。支持多租户、数据权限、动态Api、任务调度、OSS文件上传、滑块拼图验证、国内外主流数据库自由切换和动态高级查询。集成统一认证授权、CAP事件总线、数据验证、分布式缓存、Ip限流、全Api鉴权、单元测试、性能分析、Swagger Api。
- ZhonTai Admin MyApp MVC WebApi Api Swagger
+ 中台接口模板
+ ZhonTai MyApp MVC WebApi Api Swagger
logo.png
diff --git a/templates/im/content/.template.config/template.json b/templates/im/content/.template.config/template.json
new file mode 100644
index 00000000..23cf3295
--- /dev/null
+++ b/templates/im/content/.template.config/template.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "xiao xue",
+ "classifications": [ "ZhonTai", "IM", "MyIMServer", "IMServer" ],
+ "name": "ZhonTai.Template MyIMServer",
+ "identity": "MyIMServer",
+ "shortName": "MyIMServer",
+ "tags": {
+ "language": "C#" ,
+ "type":"project"
+ },
+ "sourceName": "MyIMServer",
+ "preferNameDirectory": true,
+ "symbols": {
+ },
+ "sources": [
+ ]
+}
\ No newline at end of file
diff --git a/templates/im/content/MyIMServer.Host/MyIMServer.Host.csproj b/templates/im/content/MyIMServer.Host/MyIMServer.Host.csproj
new file mode 100644
index 00000000..3c4635cb
--- /dev/null
+++ b/templates/im/content/MyIMServer.Host/MyIMServer.Host.csproj
@@ -0,0 +1,15 @@
+
+
+ net9.0
+ enable
+ enable
+
+
+
+ 1701;1702;1591;8632;CS8002;NU1902;NU1903;NU1904;
+
+
+
+
+
+
diff --git a/templates/im/content/MyIMServer.Host/Program.cs b/templates/im/content/MyIMServer.Host/Program.cs
new file mode 100644
index 00000000..da1743ed
--- /dev/null
+++ b/templates/im/content/MyIMServer.Host/Program.cs
@@ -0,0 +1,22 @@
+using System.Text;
+
+var builder = WebApplication.CreateBuilder(args);
+
+// Add services to the container.
+
+var app = builder.Build();
+var configuration = app.Configuration;
+
+// Configure the HTTP request pipeline.
+Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+Console.OutputEncoding = Encoding.GetEncoding("GB2312");
+Console.InputEncoding = Encoding.GetEncoding("GB2312");
+
+app.UseFreeImServer(new ImServerOptions
+{
+ Redis = new FreeRedis.RedisClient(configuration["ImServerOptions:RedisClient"]),
+ Servers = configuration["ImServerOptions:Servers"]?.Split(";"),
+ Server = configuration["ImServerOptions:Server"],
+});
+
+app.Run();
diff --git a/templates/im/content/MyIMServer.Host/Properties/launchSettings.json b/templates/im/content/MyIMServer.Host/Properties/launchSettings.json
new file mode 100644
index 00000000..76d88852
--- /dev/null
+++ b/templates/im/content/MyIMServer.Host/Properties/launchSettings.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "ImServer": {
+ "commandName": "Project",
+ "commandLineArgs": "--urls=http://*:6010"
+ }
+ }
+}
diff --git a/templates/im/content/MyIMServer.Host/appsettings.Development.json b/templates/im/content/MyIMServer.Host/appsettings.Development.json
new file mode 100644
index 00000000..0c208ae9
--- /dev/null
+++ b/templates/im/content/MyIMServer.Host/appsettings.Development.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ }
+}
diff --git a/templates/im/content/MyIMServer.Host/appsettings.json b/templates/im/content/MyIMServer.Host/appsettings.json
new file mode 100644
index 00000000..9b6f9ef1
--- /dev/null
+++ b/templates/im/content/MyIMServer.Host/appsettings.json
@@ -0,0 +1,14 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*",
+ "ImServerOptions": {
+ "RedisClient": "127.0.0.1:6379,password=,poolsize=10,defaultDatabase=6",
+ "Servers": "127.0.0.1:6010",
+ "Server": "127.0.0.1:6010"
+ }
+}
diff --git a/templates/im/content/MyIMServer.sln b/templates/im/content/MyIMServer.sln
new file mode 100644
index 00000000..fb0d2bd7
--- /dev/null
+++ b/templates/im/content/MyIMServer.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.12.35514.174 d17.12
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyIMServer.Host", "MyIMServer.Host\MyIMServer.Host.csproj", "{F9009C41-125A-40F7-8740-BC72280D016E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F9009C41-125A-40F7-8740-BC72280D016E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F9009C41-125A-40F7-8740-BC72280D016E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F9009C41-125A-40F7-8740-BC72280D016E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F9009C41-125A-40F7-8740-BC72280D016E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/templates/im/content/README.md b/templates/im/content/README.md
new file mode 100644
index 00000000..f39a73ff
--- /dev/null
+++ b/templates/im/content/README.md
@@ -0,0 +1,39 @@
+
+MyIMServer即时通讯服务端项目模板说明
+
+*********************************************************
+
+### nuget下载地址
+```
+https://www.nuget.org/downloads
+```
+> 将`nuget.exe`放到 `F:\zhontai\Admin.Core\templates` 目录下
+
+### 查看模板列表
+```
+dotnet new list
+```
+
+### 生成nuget包
+在 `F:\zhontai\Admin.Core\templates` 目录下 cmd 执行以下命令生成nuget包
+```
+nuget pack F:\zhontai\Admin.Core\templates\im\templates.nuspec -NoDefaultExcludes
+```
+### 安装模板
+```
+dotnet new install ZhonTai.Template.IMServer
+```
+安装本地
+```
+dotnet new install F:\zhontai\Admin.Core\templates\ZhonTai.Template.IMServer.1.0.0.nupkg
+```
+
+### 创建项目
+```
+dotnet new MyIMServer -n MyCompanyName.IMServer
+```
+
+### 卸载模板
+```
+dotnet new uninstall ZhonTai.Template.IMServer
+```
diff --git a/templates/im/license/LICENSE b/templates/im/license/LICENSE
new file mode 100644
index 00000000..4e3c578f
--- /dev/null
+++ b/templates/im/license/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 zhontai
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/templates/im/logo.png b/templates/im/logo.png
new file mode 100644
index 00000000..1c76fbf3
Binary files /dev/null and b/templates/im/logo.png differ
diff --git a/templates/im/templates.nuspec b/templates/im/templates.nuspec
new file mode 100644
index 00000000..23d7a2bf
--- /dev/null
+++ b/templates/im/templates.nuspec
@@ -0,0 +1,29 @@
+
+
+
+ ZhonTai.Template.IMServer
+ 1.0.0
+ xiao xue
+ zhon tai
+ https://github.com/zhontai/Admin.Core
+
+ MIT
+
+
+ Copyright ©2020 zhontai
+ 中台即时通讯服务端模板
+ ZhonTai IM IMServer MyIMServer
+ logo.png
+
+
+
+
+
+ $CommonFileElements$
+
+
+
+
\ No newline at end of file