Please add a constructor function for Docket.class
See original GitHub issueHere is the reason:
For now users can only register Docket using Spring @Bean annotation. And if you want to register the Docket by hand using BeanDefinition
, you will fail because Docket creates instances using builder-mode, rather than the normal way (setter
and getter
). Spring context can not inject values for Docket’s member variables.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
The method apis(java.util.function.Predicate<springfox ...
I have added Swagger config class with @Beans as usual. The method apis(java.util.function.Predicate<springfox.documentation.RequestHandler>) in ...
Read more >Spring Boot Swagger 2 Configuration Error creating bean with ...
Hi, I am running into an unsatisfied dependency exception for apiModelReader class when trying to configure swagger support for my spring web ...
Read more >Class Docket
A builder which is intended to be the primary interface into the Springfox framework. Provides sensible defaults and convenience methods for configuration.
Read more >How to configure Swagger in Spring Boot - Brain Bytes
We'll create a Docket instance and customize the API metadata and the details. We'll also use various annotations to add notes and ...
Read more >Advanced Swagger Configuration with Spring Boot
Customizing the Docket Bean ... As you can see in the above code, we have added apiInfo() method that expects an object of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tbwork that is what I would do as well. Thanks for the solution!
This is simplely my method to optimize the usage of swagger in terms of convenience.
1. Define a new swagger definition annotation:
2. Providing an annotation as “SwaggerConfiguration”, and use it to specify one package path for searching those swagger modules. Following is only an example:
Hope it is helpful. Have a nice day!