From 3367979d75170b9edf425c8021dd2216524217f8 Mon Sep 17 00:00:00 2001 From: zhifenglee-aelf Date: Sat, 26 Oct 2024 10:15:17 +0800 Subject: [PATCH] docs(readme): updated readme setup --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e14af9d..d4aa157 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,22 @@ Add the following dependency to your project's Module class: using AElf.ExceptionHandler; [DependsOn( - typeof(AOPExceptionModule) + typeof(AOPExceptionModule) // Add this line )] public class MyTemplateModule : AbpModule ``` +When setting up your `HostBuilder` in your `Program.cs` file, add the following line: + +```cs +var builder = WebApplication.CreateBuilder(args); +builder.Host + .ConfigureDefaults(args) + .UseAutofac() + .UseAElfExceptionHandler() // Add this line + .UseSerilog(); +``` + This will automatically register the AOPException module and setup your project for AOP Exception Handling. ## Contributing