From 9719693571035660c9098fe783beb4bc614d6d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=AF=85?= <2667210109@qq.com> Date: Wed, 2 Oct 2024 14:03:22 +0800 Subject: [PATCH] bug --- asg_form.sln | 12 ---------- asg_form/Controllers/Champion.cs | 1 - asg_form/Controllers/Team/Team_http.cs | 2 +- asg_form/Controllers/blog.cs | 1 - asg_form/Controllers/form_cs.cs | 10 +++----- asg_form/Controllers/schedule.cs | 1 - asg_form/Dockerfile | 31 ------------------------- asg_form/Properties/launchSettings.json | 11 +++++++++ asg_form/asg_form.csproj | 5 +++- 9 files changed, 19 insertions(+), 55 deletions(-) delete mode 100644 asg_form/Dockerfile diff --git a/asg_form.sln b/asg_form.sln index 73166bf..5e0c515 100644 --- a/asg_form.sln +++ b/asg_form.sln @@ -12,10 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决 main.md = main.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asg_form.AppHost", "asg_form.AppHost\asg_form.AppHost.csproj", "{6689650E-6BBD-4F79-AD60-18467AD94EE1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asg_form.ServiceDefaults", "asg_form.ServiceDefaults\asg_form.ServiceDefaults.csproj", "{D8E4D33B-B189-4419-AE8C-417160139B8C}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,14 +22,6 @@ Global {6BBCCC2C-1B0A-4456-B9E5-B0EF2B156D8B}.Debug|Any CPU.Build.0 = Debug|Any CPU {6BBCCC2C-1B0A-4456-B9E5-B0EF2B156D8B}.Release|Any CPU.ActiveCfg = Release|Any CPU {6BBCCC2C-1B0A-4456-B9E5-B0EF2B156D8B}.Release|Any CPU.Build.0 = Release|Any CPU - {6689650E-6BBD-4F79-AD60-18467AD94EE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6689650E-6BBD-4F79-AD60-18467AD94EE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6689650E-6BBD-4F79-AD60-18467AD94EE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6689650E-6BBD-4F79-AD60-18467AD94EE1}.Release|Any CPU.Build.0 = Release|Any CPU - {D8E4D33B-B189-4419-AE8C-417160139B8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D8E4D33B-B189-4419-AE8C-417160139B8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D8E4D33B-B189-4419-AE8C-417160139B8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D8E4D33B-B189-4419-AE8C-417160139B8C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/asg_form/Controllers/Champion.cs b/asg_form/Controllers/Champion.cs index ee133c1..9142275 100644 --- a/asg_form/Controllers/Champion.cs +++ b/asg_form/Controllers/Champion.cs @@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Security.Claims; -using static asg_form.Controllers.提交表单; namespace asg_form.Controllers { diff --git a/asg_form/Controllers/Team/Team_http.cs b/asg_form/Controllers/Team/Team_http.cs index cd741c5..f4e71b1 100644 --- a/asg_form/Controllers/Team/Team_http.cs +++ b/asg_form/Controllers/Team/Team_http.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SignalR; using Microsoft.EntityFrameworkCore; using System.Security.Claims; -using static 所有队伍; +using static allteam1; namespace asg_form.Controllers.Team { diff --git a/asg_form/Controllers/blog.cs b/asg_form/Controllers/blog.cs index f63cc85..25ee34c 100644 --- a/asg_form/Controllers/blog.cs +++ b/asg_form/Controllers/blog.cs @@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Security.Claims; -using static 所有队伍; namespace asg_form; public class blog : ControllerBase diff --git a/asg_form/Controllers/form_cs.cs b/asg_form/Controllers/form_cs.cs index f0cd4d0..46dc908 100644 --- a/asg_form/Controllers/form_cs.cs +++ b/asg_form/Controllers/form_cs.cs @@ -21,7 +21,6 @@ using System.Net.Mail; using System.Text; using System.Web; using static asg_form.Controllers.excel; -using static ж; using Manganese.Array; namespace asg_form.Controllers @@ -50,7 +49,7 @@ namespace asg_form.Controllers } // [Route("api/updateform/")] - public class ύ : ControllerBase + public class updateform1 : ControllerBase { private static readonly string[] Summaries = new[] { @@ -147,10 +146,7 @@ namespace asg_form.Controllers } private readonly Logger logger = LogManager.GetCurrentClassLogger(); private readonly IHubContext hubContext; - public ύ(IHubContext hubContext) - { - this.hubContext= hubContext; - } + [Route("api/v1/websocket/")] @@ -529,7 +525,7 @@ namespace asg_form.Controllers -public class ж : ControllerBase +public class allteam1 : ControllerBase { private static readonly string[] Summaries = new[] { diff --git a/asg_form/Controllers/schedule.cs b/asg_form/Controllers/schedule.cs index 5d03e7f..ac4785f 100644 --- a/asg_form/Controllers/schedule.cs +++ b/asg_form/Controllers/schedule.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Identity; -using static 所有队伍; using Microsoft.AspNetCore.Authorization; using static asg_form.blog; using System.Security.Claims; diff --git a/asg_form/Dockerfile b/asg_form/Dockerfile deleted file mode 100644 index 0a0c03e..0000000 --- a/asg_form/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# 请参阅 https://aka.ms/customizecontainer 以了解如何自定义调试容器,以及 Visual Studio 如何使用此 Dockerfile 生成映像以更快地进行调试。 - -# 此阶段用于在快速模式(默认为调试配置)下从 VS 运行时 -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base -USER $APP_UID -WORKDIR /app -EXPOSE 8080 -EXPOSE 8081 - - -# 此阶段用于生成服务项目 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build -ARG BUILD_CONFIGURATION=Release -WORKDIR /src -COPY ["asg_form/asg_form.csproj", "asg_form/"] -COPY ["asg_form.ServiceDefaults/asg_form.ServiceDefaults.csproj", "asg_form.ServiceDefaults/"] -RUN dotnet restore "./asg_form/asg_form.csproj" -COPY . . -WORKDIR "/src/asg_form" -RUN dotnet build "./asg_form.csproj" -c $BUILD_CONFIGURATION -o /app/build - -# 此阶段用于发布要复制到最终阶段的服务项目 -FROM build AS publish -ARG BUILD_CONFIGURATION=Release -RUN dotnet publish "./asg_form.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false - -# 此阶段在生产中使用,或在常规模式下从 VS 运行时使用(在不使用调试配置时为默认值) -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "ASG后端.dll"] \ No newline at end of file diff --git a/asg_form/Properties/launchSettings.json b/asg_form/Properties/launchSettings.json index ad23e8e..547ed57 100644 --- a/asg_form/Properties/launchSettings.json +++ b/asg_form/Properties/launchSettings.json @@ -44,6 +44,17 @@ }, "publishAllPorts": true, "useSSL": true + }, + "Container (.NET SDK)": { + "commandName": "SdkContainer", + "launchBrowser": true, + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", + "environmentVariables": { + "ASPNETCORE_HTTPS_PORTS": "8081", + "ASPNETCORE_HTTP_PORTS": "8080" + }, + "publishAllPorts": true, + "useSSL": true } }, "$schema": "https://json.schemastore.org/launchsettings.json", diff --git a/asg_form/asg_form.csproj b/asg_form/asg_form.csproj index 08cb795..076f8b5 100644 --- a/asg_form/asg_form.csproj +++ b/asg_form/asg_form.csproj @@ -10,6 +10,9 @@ False 90d25478-1c0b-47a3-bc23-326e0e4905d9 Linux + linux-x64 + True + mcr.microsoft.com/dotnet/aspnet:8.0 @@ -65,7 +68,7 @@ - +