From add77fb23c405ad2b08e2e3a00b9ca320b98b7e0 Mon Sep 17 00:00:00 2001 From: yubaolee Date: Sat, 28 Jun 2025 17:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83docs:=20=E5=AE=8C=E5=96=84=E5=A4=9A?= =?UTF-8?q?=E7=A7=9F=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- newdocs/docs/notes/core/multitenant.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/newdocs/docs/notes/core/multitenant.md b/newdocs/docs/notes/core/multitenant.md index df679b6d..6b4416ff 100644 --- a/newdocs/docs/notes/core/multitenant.md +++ b/newdocs/docs/notes/core/multitenant.md @@ -19,12 +19,23 @@ permalink: /core/multitenant/ #### 后端添加 -后端添加新租户连接字符串即可: +目前OpenAuth.Net的租户管理直接通过连接字符串配置,如有需要可以改为功能配置,期待你的pull request。 + +在后端OpenAuth.WebApi的`appsettings.json`中添加新租户连接字符串,并配置数据库类型: ```javascript +{ "ConnectionStrings": { + "OpenAuthDBContext": "Data Source=.;Encrypt=false;Initial Catalog=OpenAuthPro;User=sa;Password=000000", //默认租户id,必须要有,启动项目使用 "new_tenantid": "server=127.0.0.1;user id=root;database=openauthpro;password=000000" //新租户id对应的连接字符串 }, + "AppSetting": { + "DbTypes": { + "OpenAuthDBContext": "SqlServer", + "new_tenantid": "MySql" //新租户id对应的数据库类型 + } + } +} ``` ::: warning 注意