Modify @Primary annotation to @ConditionalOnMissingBean annotation

When I used flowable-app-rest in my project。
When I customize a DataSource in the dev environment, I use @Primary annotation. Item reported wrong.

Can you merge the following PR?

I’m pretty sure that I used a custom DataSource in the dev environment.
flowable-ui-common the module 。There is a class in this module. org.flowable.ui.common.conf.DevelopmentConfiguration。

I am sure that when there are multiple @primary annotations, they are in conflict.

I think it might be better to use @ConditionalOnMissingBean, after all, I encountered this mistake.

public class DevelopmentConfiguration {
public DataSource developmentDataSource() {
return DataSourceBuilder

@shareniu are you pulling in the dependency in your own project or you are doing something else? As we have never seen a problem with this.


In our project, we used flowable-ui-common the module. There is a class in this module. org.flowable.ui.common.conf.DevelopmentConfiguration.

And our project environment is dev…

That led to the wrong report.


I used the flowable-ui-modeler-rest module, the flowable-ui-modeler-rest module dependency on the flowable-ui-modeler-logic module, and the flowable-ui-modeler-logic module dependency on the flowable-ui-common module.
And our project environment is dev…

That led to the wrong report.