question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Application does not start due to two bean instances of org.springframework.plugin.core.PluginRegistry (Follow-up)

See original GitHub issue

As 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 EntityLinksConfigurationwhere the other instance of PluginRegistry is created.)

This could be easily resolved by using @Qualifier annotations and named beans.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:32 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
chanchal99999commented, Mar 27, 2020

Add into SwaggerConfig @Bean public LinkDiscoverers discovers() {

	List<LinkDiscoverer> plugins = new ArrayList<>();
	plugins.add(new CollectionJsonLinkDiscoverer());
	return new LinkDiscoverers(SimplePluginRegistry.create(plugins));
	
}
8reactions
mgargadenneccommented, Oct 24, 2019

Same here after migration to Spring-Boot 2.2.0.RELEASE.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found