Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: NPE when add datasources from provider. #525

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

darknesstm
Copy link
Contributor

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style
  • Refactor
  • Doc
  • Other, please describe:

The description of the PR:

com.baomidou.dynamic.datasource.provider.DynamicDataSourceProvider#loadDataSources 可能会返回null,进而在com.baomidou.dynamic.datasource.DynamicRoutingDataSource#afterPropertiesSet中触发npe问题

比如com.baomidou.dynamic.datasource.provider.AbstractJdbcDataSourceProvider#loadDataSources的实现会在出现db异常的时候返回一个null

Other information:

…SourceProvider will return null when error occurs.
@huayanYu huayanYu merged commit 0e64dac into baomidou:master Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants