Application does not start due to two bean instances of org.springframework.plugin.core.PluginRegistry (Follow-up)
See original GitHub issueAs explained in the last comment of #966 , an application using spring-hateoas-1.0.0
does not start if the bean factory is setup in a way that the ParameterNameDiscoverer
is null or an alternative implementation.
The reason is that when autowiring of PluginRegistry
into the bean _relProvider
it finds two candidates and choosing one soley relies on the constructor argument name (same in EntityLinksConfiguration
where the other instance of PluginRegistry
is created.)
This could be easily resolved by using @Qualifier
annotations and named beans.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:32 (3 by maintainers)
Top Results From Across the Web
APPLICATION FAILED TO START due to same bean
I want all the beans from webflux package to be initiated, so I can't set spring.main.allow-bean-definition-overriding=true . Also tried ...
Read more >Choosing from multiple beans in the context - Manning
In this project, we define two beans of type Parrot (using the @Bean annotation) and an instance of Person (using stereotype annotations).
Read more >What is Spring Framework? An Unorthodox Guide
You can use this guide to understand what Spring framework is and how its core features like dependency injection or aspected oriented ...
Read more >correct the classpath of your application so that it contains ...
2, my application cannot start because of the dependency conflict. I did some digging and found out the reason is. swagger-ui 2.9.2 ------depend...
Read more >Top 10 Most Common Spring Framework Mistakes - Toptal
Ironically, most of the good software engineering principles start to break down at scale – especially in cases where not much thought has...
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 Free
Top 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
Add into SwaggerConfig @Bean public LinkDiscoverers discovers() {
Same here after migration to Spring-Boot 2.2.0.RELEASE.