Skip to content

Commit 41804d0

Browse files
committed
升级autofac等其他依赖的到最新版本
1 parent 1f331cf commit 41804d0

File tree

11 files changed

+24
-22
lines changed

11 files changed

+24
-22
lines changed

ant.mgr/Infrastructure/Infrastructure/CodeGen/CrudTemplete/Respository.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using AntData.ORM;
22
using AntData.ORM.Linq;
33
using Autofac.Annotation;
4-
using Castle.DynamicProxy;
4+
using Repository.Interceptors;
55
using Configuration;
66
using DbModel;
77
using Infrastructure.Logging;
@@ -18,7 +18,7 @@ using ViewModels.Reuqest;
1818

1919
namespace Repository
2020
{
21-
[Bean(typeof(I{{ModelClassName}}Respository), Interceptor = typeof(AsyncInterceptor))]
21+
[Component(typeof(I{{ModelClassName}}Respository), Interceptor = typeof(AsyncTimeoutInterceptor))]
2222
public class {{ModelClassName}}Respository : BaseRepository<{{ModelClassName}}>, I{{ModelClassName}}Respository
2323
{
2424

ant.mgr/Repository/Repository/AdminRepository/AccountRespository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using AntData.ORM;
22
using AntData.ORM.Linq;
33
using Autofac.Annotation;
4-
using Castle.DynamicProxy;
54
using Configuration;
65
using Infrastructure.Logging;
76
using Infrastructure.StaticExt;
@@ -13,14 +12,15 @@
1312
using System.Linq;
1413
using System.Threading.Tasks;
1514
using DbModel;
15+
using Repository.Interceptors;
1616
using ViewModels.Reuqest;
1717

1818
namespace Repository
1919
{
2020
/// <summary>
2121
/// 系统用户
2222
/// </summary>
23-
[Bean(typeof(IAccountRespository), Interceptor = typeof(AsyncInterceptor))]
23+
[Component(typeof(IAccountRespository), Interceptor = typeof(AsyncTimeoutInterceptor))]
2424
public class AccountRespository : BaseRepository<SystemUsers>, IAccountRespository
2525
{
2626

ant.mgr/Repository/Repository/AdminRepository/CommonRespository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using AntData.ORM.Data;
22
using AntData.ORM.Mapping;
33
using Autofac.Annotation;
4-
using Castle.DynamicProxy;
54
using DbModel;
65
using Infrastructure.CodeGen;
76
using Infrastructure.Logging;
@@ -14,14 +13,15 @@
1413
using System.IO;
1514
using System.Linq;
1615
using System.Reflection;
16+
using Repository.Interceptors;
1717
using ViewModels.Reuqest;
1818

1919
namespace Repository
2020
{
2121
/// <summary>
2222
/// 公共处理
2323
/// </summary>
24-
[Bean(typeof(ICommonRespository), Interceptor = typeof(AsyncInterceptor))]
24+
[Component(typeof(ICommonRespository), Interceptor = typeof(AsyncTimeoutInterceptor))]
2525
public class CommonRespository : BaseRepository, ICommonRespository
2626
{
2727

ant.mgr/Repository/Repository/AdminRepository/MenuRespository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using AntData.ORM;
22
using Autofac.Annotation;
3-
using Castle.DynamicProxy;
43
using Configuration;
54
using Infrastructure.StaticExt;
65
using Infrastructure.View;
@@ -14,14 +13,15 @@
1413
using System.Collections.Generic;
1514
using System.Linq;
1615
using DbModel;
16+
using Repository.Interceptors;
1717
using ViewModels.Reuqest;
1818

1919
namespace Repository
2020
{
2121
/// <summary>
2222
/// 菜单处理
2323
/// </summary>
24-
[Bean(typeof(IMenuRespository), Interceptor = typeof(AsyncInterceptor))]
24+
[Component(typeof(IMenuRespository), Interceptor = typeof(AsyncTimeoutInterceptor))]
2525
public class MenuRespository : BaseRepository<SystemMenu>, IMenuRespository
2626
{
2727

ant.mgr/Repository/Repository/AdminRepository/RoleRespository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using AntData.ORM;
22
using AntData.ORM.Data;
33
using Autofac.Annotation;
4-
using Castle.DynamicProxy;
54
using Configuration;
65
using Infrastructure.StaticExt;
76
using Newtonsoft.Json;
@@ -12,14 +11,15 @@
1211
using System.Linq;
1312
using System.Threading.Tasks;
1413
using DbModel;
14+
using Repository.Interceptors;
1515
using ViewModels.Reuqest;
1616

1717
namespace Repository
1818
{
1919
/// <summary>
2020
/// 角色权限管理
2121
/// </summary>
22-
[Bean(typeof(IRoleRespository), Interceptor = typeof(AsyncInterceptor))]
22+
[Component(typeof(IRoleRespository), Interceptor = typeof(AsyncTimeoutInterceptor))]
2323
public class RoleRespository : BaseRepository<SystemRole>, IRoleRespository
2424
{
2525
/// <summary>

ant.mgr/Repository/Repository/Interceptors/AsyncTimeoutInterceptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Repository.Interceptors
1010
/// <summary>
1111
/// 接口超时拦截器
1212
/// </summary>
13-
[Bean(typeof(AsyncInterceptor))]
13+
[Component]
1414
public class AsyncTimeoutInterceptor : AsyncInterceptor
1515
{
1616

ant.mgr/Repository/Repository/Repository.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Autofac.Annotation" Version="1.0.6" />
12+
<PackageReference Include="Autofac.Annotation" Version="2.0.1" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

ant.mgr/mgr.core/Areas/Admin/Filter/AuthorizeFilterAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace ant.mgr.core.Filter
1818
{
19-
[Bean]
19+
[Component]
2020
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
2121
public class AuthorizeFilterAttribute : AuthorizeServiceFilterAttribute, IFilterFactory, IFilterMetadata
2222
{

ant.mgr/mgr.core/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
5252
//autofac打标签模式 文档:https://github.com/yuzd/Autofac.Annotation
5353
builder.RegisterModule(new AutofacAnnotationModule(this.GetType().Assembly, typeof(BaseRepository<>).Assembly)
5454
.SetAllowCircularDependencies(true)
55-
.InstancePerLifetimeScope());
55+
.SetDefaultAutofacScopeToInstancePerLifetimeScope());
5656

5757
var container = builder.Build();
5858
var serviceProvider = new AutofacServiceProvider(container);

ant.mgr/mgr.core/Web.config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
<handlers>
55
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
66
</handlers>
7-
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout">
8-
<environmentVariables />
7+
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
8+
<environmentVariables>
9+
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
10+
</environmentVariables>
911
</aspNetCore>
1012
<modules runAllManagedModulesForAllRequests="true" />
1113
<directoryBrowse enabled="false" />

ant.mgr/mgr.core/ant.mgr.core.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.2</TargetFramework>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6-
<Version>2.1</Version>
6+
<Version>2.2</Version>
77
</PropertyGroup>
88

99
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -13,14 +13,14 @@
1313

1414

1515
<ItemGroup>
16-
<PackageReference Include="Autofac.Annotation" Version="1.0.6" />
17-
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.3.1" />
16+
<PackageReference Include="Autofac.Annotation" Version="2.0.1" />
17+
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.4.0" />
1818
<PackageReference Include="Microsoft.AspNetCore.App" />
1919
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
2020
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
21-
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
22-
<PackageReference Include="NLog.Extensions.Logging" Version="1.3.0" />
23-
<PackageReference Include="NLog.MailKit" Version="3.0.0" />
21+
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
22+
<PackageReference Include="NLog.Extensions.Logging" Version="1.5.4" />
23+
<PackageReference Include="NLog.MailKit" Version="3.1.0" />
2424
</ItemGroup>
2525

2626
<ItemGroup>

0 commit comments

Comments
 (0)