From 8df4b413d8bd2c16276fa5973e6f25af037c8e6f Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Wed, 24 Jun 2020 11:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=87=A0=E4=B8=AA=E5=B8=B8?= =?UTF-8?q?=E7=94=A8=E6=A8=A1=E5=9D=97README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../README.md | 29 ++++++++++++++ .../LINGYUN.Abp.BlobStoring.Aliyun/README.md | 34 +++++++++++++++++ .../README.md | 37 ++++++++++++++++++ .../LINGYUN.Abp.ExceptionHandling/README.md | 26 +++++++++++++ .../common/LINGYUN.Abp.Sms.Aliyun/README.md | 38 +++++++++++++++++++ 5 files changed, 164 insertions(+) create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/README.md create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/README.md create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/README.md create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/README.md create mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/README.md diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/README.md b/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/README.md new file mode 100644 index 000000000..a52014fcd --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Aliyun.Authorization/README.md @@ -0,0 +1,29 @@ +# LINGYUN.Abp.Aliyun.Authorization + +阿里云基础认证模块, 目前只需要访问控制功能, 因此只定义了AppKeyId和AccessKeySecret。 + +## 配置使用 + +模块按需引用,使用到阿里云的模块基本都需要依赖于此 + +事先定义**appsettings.json**文件 + +```json +{ + "Aliyun": { + "Auth": { + "AccessKeyId": "你的阿里云访问标识", + "AccessKeySecret": "你的阿里云访问密钥" + } + } +} + +``` + +```csharp +[DependsOn(typeof(AbpAliyunAuthorizationModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` \ No newline at end of file diff --git a/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/README.md b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/README.md new file mode 100644 index 000000000..13f724716 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.BlobStoring.Aliyun/README.md @@ -0,0 +1,34 @@ +# LINGYUN.Abp.BlobStoring.Aliyun + +abp框架对象存储提供者**IBlobProvider**的阿里云实现 + +## 配置使用 + +模块按需引用,需要引用阿里云公共基础认证模块 + +事先定义**appsettings.json**文件 + +```json +{ + "Aliyun": { + "Auth": { + "AccessKeyId": "你的阿里云访问标识", + "AccessKeySecret": "你的阿里云访问密钥" + }, + "OSS": { + "BucketName": "你定义的BucketName", + "Endpoint": "http://oss-cn-shanghai.aliyuncs.com", + "CreateBucketIfNotExists": true + } + } +} + +``` + +```csharp +[DependsOn(typeof(AbpBlobStoringAliyunModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` \ No newline at end of file diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/README.md b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/README.md new file mode 100644 index 000000000..c870a6afe --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling.Emailing/README.md @@ -0,0 +1,37 @@ +# LINGYUN.Abp.ExceptionHandling.Emailing + +基于abp框架底层的**IExceptionSubscriber**的邮件通知类型 + +## 配置使用 + +使用前需要配置**AbpExceptionHandlingOptions**定义需要发送通知的异常 +然后配置**AbpEmailExceptionHandlingOptions**定义具体异常类型通知方式 + +```csharp + + [DependsOn( + typeof(AbpEmailingExceptionHandlingModule) + )] + public class YouProjectModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + // 自定义需要处理的异常 + Configure(options => + { + // 加入需要处理的异常类型 + options.Handlers.Add(); + }); + // 自定义需要发送邮件通知的异常类型 + Configure(options => + { + // 是否发送堆栈信息 + options.SendStackTrace = true; + // 未指定异常接收者的默认接收邮件 + options.DefaultReceiveEmail = "colin.in@foxmail.com"; + // 指定某种异常发送到哪个邮件 + options.HandReceivedException("colin.in@foxmail.com"); + }); + } + } +``` \ No newline at end of file diff --git a/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/README.md b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/README.md new file mode 100644 index 000000000..fb0e77b7a --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.ExceptionHandling/README.md @@ -0,0 +1,26 @@ +# LINGYUN.Abp.ExceptionHandling + +基于abp框架底层的**IExceptionSubscriber**实现二次扩展,用于自定义异常通知方式 + +## 配置使用 + +使用前只需配置**AbpExceptionHandlingOptions**定义需要发送通知的异常即可。 + +```csharp + + [DependsOn( + typeof(AbpExceptionHandlingModule) + )] + public class YouProjectModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + // 自定义需要处理的异常 + Configure(options => + { + // 加入需要处理的异常类型 + options.Handlers.Add(); + }); + } + } +``` \ No newline at end of file diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/README.md b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/README.md new file mode 100644 index 000000000..110feb919 --- /dev/null +++ b/aspnet-core/modules/common/LINGYUN.Abp.Sms.Aliyun/README.md @@ -0,0 +1,38 @@ +# LINGYUN.Abp.Sms.Aliyun + +abp框架短信发送接口**ISmsSender**的阿里云实现 + +## 配置使用 + +模块按需引用,需要引用阿里云公共基础认证模块 + +事先定义**appsettings.json**文件 + +```json +{ + "Aliyun": { + "Auth": { + "AccessKeyId": "你的阿里云访问标识", + "AccessKeySecret": "你的阿里云访问密钥" + }, + "Sms": { + "RegionId": "cn-hangzhou", + "Domain": "dysmsapi.aliyuncs.com", + "Version": "2017-05-25", + "DefaultSignName": "你的阿里云短信签名,SmsMessage.Properties[SignName]不存在则使用DefaultSignName", + "DefaultTemplateCode": "你的阿里云短信模板,SmsMessage.Properties[TemplateCode]不存在则使用DefaultTemplateCode", + "DeveloperPhoneNumber": "这是用于在开发模式下的短信号码,用于统一接收短信", + "VisableErrorToClient": true + } + } +} + +``` + +```csharp +[DependsOn(typeof(AbpAliyunSmsModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` \ No newline at end of file