You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| LINGYUN/Abp/MultiTenancy/RemoteService | 6 years ago | |
| LINGYUN.Abp.MultiTenancy.RemoteService.csproj | 5 years ago | |
| README.md | 6 years ago | |
README.md
LINGYUN.Abp.MultiTenancy.RemoteService
abp 多租户远程服务组件,引用此模块将首先从分布式缓存查询当前租户配置
如果缓存不存在,则调用远程租户服务接口获取租户数据,并存储到分布式缓存中
配置使用
模块按需引用
如果远程服务接口定义了授权策略,需要配置接口客户端授权,并且启动项目需要引用Volo.Abp.Http.Client.IdentityModel模块
// .NET CLI
dotnet add package Volo.Abp.Http.Client.IdentityModel --version 3.0.0
// Package Manager
Install-Package Volo.Abp.Http.Client.IdentityModel -Version 3.0.0
具体RemoteServices与IdentityClients配置请阅读abp文档
事先定义appsettings.json文件
{
"RemoteServices": {
"TenantManagement": {
"BaseUrl": "http://localhost:30000/",
"IdentityClient": "tenant-finder-client"
}
},
"IdentityClients": {
"tenant-finder-client": {
"Authority": "http://localhost:44385",
"RequireHttps": false,
"GrantType": "client_credentials",
"ClientId": "tenant-finder-client",
"Scope": "tenant-service",
"ClientSecret": "1q2w3e*"
}
}
}
[DependsOn(typeof(AbpRemoteServiceMultiTenancyModule))]
public class YouProjectModule : AbpModule
{
// other
}