创建停车场微服务

pull/1/head
刘鑫 3 months ago
parent 0d5fd51c5c
commit ad77cfdebf
  1. 17
      WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.csproj
  2. 6
      WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/ParkingLotService.API.http
  3. 36
      WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Program.cs
  4. 41
      WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/Properties/launchSettings.json
  5. 9
      WeiCloud.Fusion/ParkingLotService/ParkingLotService.API/appsettings.json
  6. 9
      WeiCloud.Fusion/WeiCloud.Fusion.sln

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>

@ -0,0 +1,6 @@
@ParkingLotService.API_HostAddress = http://localhost:5148
GET {{ParkingLotService.API_HostAddress}}/weatherforecast/
Accept: application/json
###

@ -0,0 +1,36 @@
namespace ParkingLotService.API
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
}
}
}

@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:21887",
"sslPort": 44303
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5148",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7229;http://localhost:5148",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.14.36310.24 d17.14 VisualStudioVersion = 17.14.36310.24
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspireApp", "AspireApp", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspireApp", "AspireApp", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject EndProject
@ -37,6 +37,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Video.Domain", "VideoServic
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Video.Store", "VideoService\Video.Store\Video.Store.csproj", "{058C0CAB-5956-4811-8340-86919DDB2845}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Video.Store", "VideoService\Video.Store\Video.Store.csproj", "{058C0CAB-5956-4811-8340-86919DDB2845}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParkingLotService.API", "ParkingLotService\ParkingLotService.API\ParkingLotService.API.csproj", "{D97C471C-3190-4F8E-A916-7A056A65EDCE}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -87,6 +89,10 @@ Global
{058C0CAB-5956-4811-8340-86919DDB2845}.Debug|Any CPU.Build.0 = Debug|Any CPU {058C0CAB-5956-4811-8340-86919DDB2845}.Debug|Any CPU.Build.0 = Debug|Any CPU
{058C0CAB-5956-4811-8340-86919DDB2845}.Release|Any CPU.ActiveCfg = Release|Any CPU {058C0CAB-5956-4811-8340-86919DDB2845}.Release|Any CPU.ActiveCfg = Release|Any CPU
{058C0CAB-5956-4811-8340-86919DDB2845}.Release|Any CPU.Build.0 = Release|Any CPU {058C0CAB-5956-4811-8340-86919DDB2845}.Release|Any CPU.Build.0 = Release|Any CPU
{D97C471C-3190-4F8E-A916-7A056A65EDCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D97C471C-3190-4F8E-A916-7A056A65EDCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D97C471C-3190-4F8E-A916-7A056A65EDCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D97C471C-3190-4F8E-A916-7A056A65EDCE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -103,6 +109,7 @@ Global
{44E0B645-482B-4841-87E7-1E9166700185} = {19A25984-FFA8-49BE-A710-6F269A406C61} {44E0B645-482B-4841-87E7-1E9166700185} = {19A25984-FFA8-49BE-A710-6F269A406C61}
{6CBD9E97-4FEF-4DA2-ADFB-21B4D9DB366F} = {19A25984-FFA8-49BE-A710-6F269A406C61} {6CBD9E97-4FEF-4DA2-ADFB-21B4D9DB366F} = {19A25984-FFA8-49BE-A710-6F269A406C61}
{058C0CAB-5956-4811-8340-86919DDB2845} = {19A25984-FFA8-49BE-A710-6F269A406C61} {058C0CAB-5956-4811-8340-86919DDB2845} = {19A25984-FFA8-49BE-A710-6F269A406C61}
{D97C471C-3190-4F8E-A916-7A056A65EDCE} = {0A3134C8-219C-4674-B152-1FA6561E4217}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {379A56DA-D3F0-4E7E-8FF7-DA8E20015BF3} SolutionGuid = {379A56DA-D3F0-4E7E-8FF7-DA8E20015BF3}

Loading…
Cancel
Save