Skip to content

Condition evaluation report entry for a @ConditionalOnSingleCandidate that does not match due to multiple primary beans isn't as clear as it could be #30073

@junyongz

Description

@junyongz

In the event there is multiple @primary DataSource but one with proper 'dataSource' naming, no EntityManagerFactory bean will be created at all.

This can only be seen when the logging info is set at TRACE level, to find out how many dataSource beans created, and causing this AutoConfiguration not "properly" configured.

Consider to either allow the ConditionalOnSingleCandidate annotation to add attribute whether to throw error or warn upon there is multiple @primary DataSource defined.

Or to allow this AutoConfiguration to log warning message when detect multiple @primary DataSource beans

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions