I'm new to the ABP framework
and I'm trying to follow the tutorial from the start to see if this will fit our needs but the solution does not work as expected.
I've followed all the steps on the first page and everything is building and running as expected. At the end, I'm supposed to be able to see the new Book API on the Web Swagger interface but unfortunately this is not working.
To try and resolve the issue I did the following:
I modified the Web project's BookStoreWebModule.cs file and added
Configure(options =>
{
options
.ConventionalControllers
.Create(typeof(BookStoreApplicationModule).Assembly);
});
to the ConfigureServices
method. When doing that, I'm able to see the book items in swagger.
When then calling the method via swagger, I'm presented with an internal server error
and the logs display:
[ERR] The requested service 'Acme.BookStore.Books.BookAppService' has
not been registered. To avoid this exception, either register a
component to provide the service, check for service registration using
IsRegistered(), or use the ResolveOptional() method to resolve an
optional dependency.
Autofac.Core.Registration.ComponentNotRegisteredException: The
requested service 'Acme.BookStore.Books.BookAppService' has not been
registered. To avoid this exception, either register a component to
provide the service, check for service registration using
IsRegistered(), or use the ResolveOptional() method to resolve an
optional dependency.
I also tried running the ABP Framework 4.2 RC
example but this breaks when I try and run the DBMigrator
.
question from:
https://stackoverflow.com/questions/65902389/abp-framework-tutorial-web-application-swagger-does-not-display-new-model 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…