From f81537385561b747421b1aa4f4d6753908ee6b26 Mon Sep 17 00:00:00 2001 From: John Deng Date: Sun, 25 Aug 2024 12:08:00 +0800 Subject: [PATCH] use prototype instead of request scope for middleware client --- starter/gorm/autoconfigure.go | 2 +- starter/redis/autoconfigure.go | 2 +- starter/sqlx/autoconfigure.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/starter/gorm/autoconfigure.go b/starter/gorm/autoconfigure.go index e16214b..92ecdb6 100644 --- a/starter/gorm/autoconfigure.go +++ b/starter/gorm/autoconfigure.go @@ -29,7 +29,7 @@ import ( const Profile = "gorm" type DB struct { - at.Scope `value:"request"` + at.Scope `value:"prototype"` *gorm.DB } diff --git a/starter/redis/autoconfigure.go b/starter/redis/autoconfigure.go index abc9223..5c433e2 100644 --- a/starter/redis/autoconfigure.go +++ b/starter/redis/autoconfigure.go @@ -28,7 +28,7 @@ import ( const Profile = "redis" type Client struct { - at.Scope `value:"request"` + at.Scope `value:"prototype"` *redis.Client } diff --git a/starter/sqlx/autoconfigure.go b/starter/sqlx/autoconfigure.go index 1a969eb..3261059 100644 --- a/starter/sqlx/autoconfigure.go +++ b/starter/sqlx/autoconfigure.go @@ -28,7 +28,7 @@ import ( const Profile = "sqlx" type DB struct { - at.Scope `value:"request"` + at.Scope `value:"prototype"` *sqlx.DB }