Explorar el Código

auto commit 1.3.11

lith hace 3 años
padre
commit
a2852d57d6

+ 1 - 1
02.Gateway/ServiceAdaptor.NetCore.Gateway/ServiceAdaptor.NetCore.Gateway.csproj

@@ -7,7 +7,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netcoreapp2.1</TargetFramework>
-		<Version>1.3.10</Version>
+		<Version>1.3.11</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 0 - 72
Library/ServiceAdaptor.NetCore.Be.Eureka/ApiClient.cs

@@ -1,72 +0,0 @@
-
-using RestTemplateCore;
-using ServiceAdaptor.NetCore.Client;
-using Steeltoe.Discovery.Eureka.Transport;
-using System.Collections.Generic;
-using System.Net;
-using System.Threading.Tasks;
-using Vit.Extensions;
-
-namespace ServiceAdaptor.NetCore.Be.Eureka
-{
-    public class ApiClient : global::ServiceAdaptor.NetCore.MinHttp.ApiClient
-    {
-        EurekaHttpClient client => Blueearth.Common.MyHttpContext.EurekaClient;
-
-
-        #region ApiEvent
-        class ApiEvent : IApiEvent
-        {
-            public ApiClient apiClient; 
-            public async Task<ApiResponse<ReturnType>> BeforeCallApi<ReturnType>(ApiRequest req)
-            {
-
-                #region header.Authorization
-                {
-                    var Authorization = BlueearthHttpContext.Current?.Request?.Headers["Authorization"].ToString();
-                    if (!string.IsNullOrEmpty(Authorization))
-                    {
-                        var header = req.headers;
-                        if (header == null)
-                        {
-                            req.headers = header = new Dictionary<string, string>();                      
-                        }
-                        header.TryAdd("Authorization", Authorization);
-                    }
-                }
-                #endregion
-
-
-                #region redirect url
-                {
-                    //"http://client-test-service/client/Enterprise_project/GetCompaniesby"
-                    var beEurekaUrl = "http://" + req.GetServiceName() + req.url;
-
-                    var rest = new RestTemplate(apiClient.client, apiClient.vitHttpClient.httpClient);
-                    //var service = await rest.ResolveRootUrlAsync("file-service");
-                    try
-                    {
-                        req.url = await rest.ResolveUrlAsync(beEurekaUrl);
-                    }
-                    catch (System.Exception)
-                    {
-                        return new ApiResponse<ReturnType> { StatusCode = (int)HttpStatusCode.NotFound };
-                    }
-                }
-                #endregion
-
-                return null;
-            }
-        }
-        #endregion
-
-
-
-        public ApiClient() 
-        {
-            this.AddEvent(new ApiEvent { apiClient=this});
-        }  
-
-
-    }
-}

+ 0 - 38
Library/ServiceAdaptor.NetCore.Be.Eureka/ServiceAdaptor.NetCore.Be.Eureka.csproj

@@ -1,38 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>1.3.10</Version>
-    <PackageProjectUrl>https://github.com/serset/ServiceAdaptor.NetCore</PackageProjectUrl>
-  </PropertyGroup>
-
-  <PropertyGroup>
-    <DocumentationFile>bin\Debug\netstandard2.0\ServiceAdaptor.NetCore.Be.Eureka.xml</DocumentationFile>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ProjectReference Include="..\ServiceAdaptor.NetCore.MinHttp\ServiceAdaptor.NetCore.MinHttp.csproj" />
-    <ProjectReference Include="..\ServiceAdaptor.NetCore\ServiceAdaptor.NetCore.csproj" />
-  </ItemGroup>
-
-
-  <ItemGroup>
-    <PackageReference Include="Vit.WebHost" Version="2.1.1.499" />    
-    <PackageReference Include="Blueearth" Version="4.0.29" />
- 
-    
-    <Reference Include="EurekaRestTemplate">
-      <HintPath>dll\EurekaRestTemplate.dll</HintPath>
-    </Reference>
-    <Reference Include="Steeltoe.Discovery.ClientAutofac">
-      <HintPath>dll\Steeltoe.Discovery.ClientAutofac.dll</HintPath>
-    </Reference>
-    <Reference Include="Steeltoe.Discovery.ClientCore">
-      <HintPath>dll\Steeltoe.Discovery.ClientCore.dll</HintPath>
-    </Reference>
-    <Reference Include="Steeltoe.Discovery.EurekaBase">
-      <HintPath>dll\Steeltoe.Discovery.EurekaBase.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  
-</Project>

+ 0 - 52
Library/ServiceAdaptor.NetCore.Be.Eureka/ServiceAdaptor.cs

@@ -1,52 +0,0 @@
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Http;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Newtonsoft.Json.Linq;
-using ServiceAdaptor.NetCore.Client;
-using Steeltoe.Discovery.Client;
-using Vit.Core.Module.Log;
-using Vit.Extensions;
-
-namespace ServiceAdaptor.NetCore.Be.Eureka
-{
-    public class ServiceAdaptor : IServiceAdaptor
-    {
-        public IWebHostBuilder InitWebHostBuilder(IWebHostBuilder builder, JObject config, out IApiClient apiClient)
-        {
-            var httpApi = new ApiClient();
-            apiClient = httpApi;
-
-            #region 超时时间
-            var timeoutSeconds = config["timeoutSeconds"].ConvertBySerialize<int?>();
-            if (timeoutSeconds.HasValue)
-            {
-                httpApi.vitHttpClient.TimeoutSeconds = timeoutSeconds.Value;
-            }
-            #endregion
-
-            builder.ConfigureServices((WebHostBuilderContext context, IServiceCollection services) =>
-            {               
-
-                var env = services.BuildServiceProvider().GetService<IHostingEnvironment>();
-                var configBuilder = new ConfigurationBuilder().SetBasePath(env.ContentRootPath)
-                  .AddJsonFile("appsettings.json")
-                  .AddEnvironmentVariables();
-                var Configuration = configBuilder.Build();
-
-                //services.AddBlueearthProvider(Configuration);          
-                //services.AddBlueearthProvider(Configuration, false, false, true);
-                services.AddBlueearthProvider(Configuration, false, false, false);
-
-                services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
-
-            }).AddConfigure(app=> 
-            {              
-                app.UseDiscoveryClient();
-            });    
-
-
-            return builder;
-        }
-    }
-}

BIN
Library/ServiceAdaptor.NetCore.Be.Eureka/dll/EurekaRestTemplate.dll


BIN
Library/ServiceAdaptor.NetCore.Be.Eureka/dll/Steeltoe.Discovery.ClientAutofac.dll


BIN
Library/ServiceAdaptor.NetCore.Be.Eureka/dll/Steeltoe.Discovery.ClientCore.dll


BIN
Library/ServiceAdaptor.NetCore.Be.Eureka/dll/Steeltoe.Discovery.EurekaBase.dll


BIN
Library/ServiceAdaptor.NetCore.Be.Eureka/dll/cn.jpush.api.dll


BIN
Library/ServiceAdaptor.NetCore.Be.Eureka/dll/cn.jpush.api.dll.refresh


+ 2 - 2
Library/ServiceAdaptor.NetCore.Consul/ServiceAdaptor.NetCore.Consul.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>1.3.10</Version>
+		<Version>1.3.11</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>
@@ -21,7 +21,7 @@
 
 	<ItemGroup>
 		<PackageReference Include="Consul" Version="0.7.2.6" />
-		<PackageReference Include="Vit.WebHost" Version="2.1.10" />
+		<PackageReference Include="Vit.WebHost" Version="2.1.11" />
 	</ItemGroup>
 
 

+ 1 - 1
Library/ServiceAdaptor.NetCore.MinHttp/ServiceAdaptor.NetCore.MinHttp.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>1.3.10</Version>
+		<Version>1.3.11</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 2 - 2
Library/ServiceAdaptor.NetCore.Sers/ServiceAdaptor.NetCore.Sers.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>1.3.10</Version>
+		<Version>1.3.11</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>
@@ -21,7 +21,7 @@
 
 	<ItemGroup>
 		<!-- Sers -->
-		<PackageReference Include="Sers.Serslot" Version="2.1.11" />
+		<PackageReference Include="Sers.Serslot" Version="2.1.12" />
 	</ItemGroup>
 
 	<ItemGroup>

+ 2 - 2
Library/ServiceAdaptor.NetCore/ServiceAdaptor.NetCore.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>1.3.10</Version>
+		<Version>1.3.11</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>
@@ -23,7 +23,7 @@
 		<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.0" />
 
 		<!-- Sers -->
-		<PackageReference Include="Vit.Core" Version="2.1.10" />
+		<PackageReference Include="Vit.Core" Version="2.1.11" />
 	</ItemGroup>
 
 

+ 1 - 1
Publish/ReleaseFile/docker-image/制作镜像.md

@@ -38,7 +38,7 @@ cd /root/image
 
 #构建镜像并推送到 Docker Hub 
 cd adaptor-gateway
-docker buildx build . -t serset/adaptor-gateway:1.3.10 -t serset/adaptor-gateway --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+docker buildx build . -t serset/adaptor-gateway:1.3.11 -t serset/adaptor-gateway --platform=linux/amd64,linux/arm64,linux/arm/v7 --push