Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

c# - ABP Framework Tutorial - Web Application - Swagger does not display new model

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...