-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
I've got a more representative demo Spring PF4J demo here:
https://github.com/claymccoy/Pf4jSpringGreetingDemo
It works fine, even when I uncomment the single greeting endpoint.
https://github.com/claymccoy/Pf4jSpringGreetingDemo/blob/master/src/main/java/org/pf4j/demo/GreetingsController.java#L25
But with the single greeting endpoint uncommented, if I add more greeting extensions via plugins it fails. That is not surprising. However, I would expect it to work if one of the extensions is marked with the Primary Spring annotation. But I still get this:
***************************
APPLICATION FAILED TO START
***************************
Description:
Field greeting in org.pf4j.demo.GreetingsController required a single bean, but 2 were found:
- org.pf4j.demo.WhazzupGreeting: a programmatically registered singleton - com.claymccoy.pf4jdemo.bjj.BjjGreeting: a programmatically registered singleton
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
> Task :bootRun FAILED
Metadata
Metadata
Assignees
Labels
No labels