Springfox swagger2 @Component does not get indexed by Spring Framework 5 `spring-context-indexer`
See original GitHub issueSpringfox Swagger Version
2.8.0
Spring Boot Version
2.0.2.RELEASE
Description
When using component-indexer
with springfox-swagger2
, the application fails to start.
Error:
Parameter 2 of method swagger2ControllerMapping in springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration
required a bean of type 'springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper'
that could not be found.
Test case
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:21 (6 by maintainers)
Top Results From Across the Web
spring-context-indexer with Swagger 3 - java - Stack Overflow
If I remove the spring-context-indexer dependency from all maven modules, the swagger ui works. How can I solve this issue? (we use spring ......
Read more >swagger-springmvc - Bountysource
At PUT endpoints I would like to hide id property whereas display at GET ... Springfox swagger2 @Component does not get indexed by...
Read more >Spring 5 candidate component index case study - AUTO1 Group
While investigating the startup times of our applications, we have identified classpath component scanning as a potential place to look for improvements.
Read more >Oct 2017 - spring-projects/spring-boot - Gitter
does any of you remember that? Andy Wilkinson. @wilkinsona. Oct 31 2017 09:08 UTC. It's part of Spring Framework. spring-context-indexer.
Read more >Spring Candidate Component Index - Home | Java By Examples
Firstly, we'll add the spring-context-indexer Maven dependency: ... want to use component indexing, all modules of our application must have an index file....
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
@Diagoras
I mean, For compatibility with spring-context-indexer, the Swagger configuration should be modified.
In addition, @Components under the following packages may require @Bean registration.
SpringfoxWebMvcConfiguration.java
ModelConfiguration
SwaggerCommonConfiguration
I hope to fix this setting in swagger.
Otherwise, all @Components in the above package must be registered by the developer directly with @Bean.
@dilipkrish cc: @ssouris @nathanmauro I wrote a PR for this issue. Could you review it?
https://github.com/springfox/springfox/pull/2971