We have investigated this issue. We need make some improvements to apis configuration since all the services need to be redirected to web gateway. However when this is the case,
abp generate-proxy -t ng
doesn't work because web gateway doesn't have the api definitions (gateways do not depend on microservice HTTP.API layers) since we are not using dynamic proxy any longer.We'll try to decide on a subtle way to generate proxy with angular when using a gateway.
export const environment = { production: false, application: { baseUrl, name: 'PlatCloud', }, oAuthConfig, apis: { default: { url: 'https://localhost:44325', rootNamespace: 'PlatCloud', }, AbpAccountPublic: { url: oAuthConfig.issuer, rootNamespace: 'AbpAccountPublic', }, ProductService: { url: 'https://localhost:44361', rootNamespace: 'PlatCloud', }, }, } as Environment;
When you defined ProductService with its own address, it should generate the related proxies with
abp generate-proxy -t ng
. I will try it on 5.2.0 and let you know.
Thank you very much. Unfortunately, I have failed on 5.2.0.
Please try to use ABP suite to create a new microservice solution. This problem still exists in the latest version 5.2.0. I hope the team can solve this problem urgently,It has seriously affected our actual work. I can't start working.
Is the product service up and running when you run
abp generate-proxy -t ng
?
yes, product service is running.
Also, can you share your
environment.ts
file?
` import { Environment } from '@abp/ng.core';
const baseUrl = 'http://localhost:4200';
const oAuthConfig = { issuer: 'https://localhost:44322', redirectUri: baseUrl, clientId: 'PlatCloud_Angular', responseType: 'code', scope: 'offline_access openid profile email phone AccountService IdentityService AdministrationService SaasService ProductService', requireHttps: true, };
export const environment = { production: false, application: { baseUrl, name: 'PlatCloud', }, oAuthConfig, apis: { default: { url: 'https://localhost:44325', rootNamespace: 'PlatCloud', }, AbpAccountPublic: { url: oAuthConfig.issuer, rootNamespace: 'AbpAccountPublic', }, ProductService: { url: 'https://localhost:44361', rootNamespace: 'PlatCloud', }, }, } as Environment;
`