Selaa lähdekoodia

修复 IPasswordHasher泛型注入受配置影响的问题

zhontai 2 vuotta sitten
vanhempi
commit
e59c6afb53

+ 1 - 2
src/platform/ZhonTai.Admin/Core/RegisterModules/RegisterModule.cs

@@ -69,8 +69,7 @@ public class RegisterModule : Module
             .InterceptedBy(interceptorServiceTypes.ToArray())
             .EnableClassInterceptors();
 
-            if(_appConfig.PasswordHasher)
-                builder.RegisterGeneric(typeof(PasswordHasher<>)).As(typeof(IPasswordHasher<>)).SingleInstance().PropertiesAutowired();
+            builder.RegisterGeneric(typeof(PasswordHasher<>)).As(typeof(IPasswordHasher<>)).SingleInstance().PropertiesAutowired();
 
             //仓储泛型注入
             builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepositoryBase<>)).InstancePerLifetimeScope().PropertiesAutowired();