Browse Source

Improve service template

pull/1159/head
Halil ibrahim Kalkan 7 years ago
parent
commit
ad51699e5d
  1. 2
      templates/service/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
  2. 4643
      templates/service/host/MyCompanyName.MyProjectName.Web.Host/Logs/logs.txt
  3. 1
      templates/service/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj
  4. 3
      templates/service/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs
  5. 4
      templates/service/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
  6. 3
      templates/service/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/appsettings.json

2
templates/service/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs

@ -27,9 +27,9 @@ namespace MyCompanyName.MyProjectName
typeof(MyProjectNameEntityFrameworkCoreModule),
typeof(MyProjectNameHttpApiModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule)
)]

4643
templates/service/host/MyCompanyName.MyProjectName.Web.Host/Logs/logs.txt

File diff suppressed because it is too large

1
templates/service/host/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj

@ -24,7 +24,6 @@
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi.Client\Volo.Abp.Identity.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj" />
</ItemGroup>
<ItemGroup>

3
templates/service/host/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs

@ -22,7 +22,6 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Http.Client.IdentityModel;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Web;
@ -45,7 +44,6 @@ namespace MyCompanyName.MyProjectName
typeof(AbpAspNetCoreMvcClientModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAutofacModule),
typeof(AbpFeatureManagementWebModule),
typeof(AbpHttpClientIdentityModelModule),
typeof(AbpIdentityWebModule),
typeof(AbpIdentityHttpApiClientModule),
@ -79,6 +77,7 @@ namespace MyCompanyName.MyProjectName
ConfigureNavigationServices();
ConfigureSwaggerServices(context.Services);
ConfigureMultiTenancy();
ConfigureRedis(context, configuration, hostingEnvironment);
}
private void ConfigureUrls(IConfigurationRoot configuration)

4
templates/service/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs

@ -76,7 +76,7 @@ namespace MyCompanyName.MyProjectName
{
httpClient.SetBearerToken(accessToken);
var url = _configurationAccessor.Configuration["RemoteServices:Default:BaseUrl"] +
var url = _configurationAccessor.Configuration["RemoteServices:MyProjectName:BaseUrl"] +
"api/MyProjectName/sample/authorized";
var responseMessage = await httpClient.GetAsync(url);
@ -137,7 +137,7 @@ namespace MyCompanyName.MyProjectName
{
httpClient.SetBearerToken(tokenResponse.AccessToken);
var url = _configurationAccessor.Configuration["RemoteServices:Default:BaseUrl"] +
var url = _configurationAccessor.Configuration["RemoteServices:MyProjectName:BaseUrl"] +
"api/MyProjectName/sample/authorized";
var responseMessage = await httpClient.GetAsync(url);

3
templates/service/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/appsettings.json

@ -1,6 +1,9 @@
{
"RemoteServices": {
"Default": {
"BaseUrl": "http://localhost:61517/"
},
"MyProjectName": {
"BaseUrl": "http://localhost:57992/"
}
},

Loading…
Cancel
Save