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 #2328 #3865

Merged
merged 4 commits into from
Aug 8, 2021
Merged

Fix #2328 #3865

merged 4 commits into from
Aug 8, 2021

Conversation

lonre
Copy link
Contributor

@lonre lonre commented Aug 1, 2021

case: beanDefinition of the bean defined in Configuration annotated class
in this case, the beanDefinition.getBeanClassName() and beanClass.getName() is not match

What's the purpose of this PR

XXXXX

Which issue(s) this PR fixes:

Fixes #

Brief changelog

XXXXX

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.
  • Update the CHANGES log.

case: beanDefinition of the bean defined in Configuration annotated class
in this case, the `beanDefinition.getBeanClassName()` and `beanClass.getName()` is not match
@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2021

Codecov Report

Merging #3865 (0b77a6c) into master (9eff000) will decrease coverage by 0.03%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3865      +/-   ##
============================================
- Coverage     50.14%   50.11%   -0.04%     
- Complexity     2464     2465       +1     
============================================
  Files           483      483              
  Lines         14919    14925       +6     
  Branches       1519     1522       +3     
============================================
- Hits           7481     7479       -2     
- Misses         6910     6917       +7     
- Partials        528      529       +1     
Impacted Files Coverage Δ
...ework/apollo/spring/util/BeanRegistrationUtil.java 72.72% <50.00%> (-8.53%) ⬇️
...mework/apollo/portal/component/PortalSettings.java 57.81% <0.00%> (-7.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9eff000...0b77a6c. Read the comment docs.

@nobodyiam
Copy link
Member

Would you please describe an actual case for this issue?

@lonre
Copy link
Contributor Author

lonre commented Aug 2, 2021

Would you please describe an actual case for this issue?

Spring Boot has a HIGHEST_PRECEDENCE PropertyPlaceholderAutoConfiguration, which defines a bean propertySourcesPlaceholderConfigurer of class PropertySourcesPlaceholderConfigurer, the beanDefinition's getBeanClassName of propertySourcesPlaceholderConfigurer is PropertyPlaceholderAutoConfiguration, not PropertySourcesPlaceholderConfigurer

@nobodyiam

@nobodyiam
Copy link
Member

Would you please describe an actual case for this issue?

Spring Boot has a HIGHEST_PRECEDENCE PropertyPlaceholderAutoConfiguration, which defines a bean propertySourcesPlaceholderConfigurer of class PropertySourcesPlaceholderConfigurer, the beanDefinition's getBeanClassName of propertySourcesPlaceholderConfigurer is PropertyPlaceholderAutoConfiguration, not PropertySourcesPlaceholderConfigurer

@nobodyiam

Is there a detailed steps to duplicate the issue? I tried the springBootDemo but seems failed to duplicate this issue.

@lonre
Copy link
Contributor Author

lonre commented Aug 5, 2021

Would you please describe an actual case for this issue?

Spring Boot has a HIGHEST_PRECEDENCE PropertyPlaceholderAutoConfiguration, which defines a bean propertySourcesPlaceholderConfigurer of class PropertySourcesPlaceholderConfigurer, the beanDefinition's getBeanClassName of propertySourcesPlaceholderConfigurer is PropertyPlaceholderAutoConfiguration, not PropertySourcesPlaceholderConfigurer
@nobodyiam

Is there a detailed steps to duplicate the issue? I tried the springBootDemo but seems failed to duplicate this issue.

Hi, just minimal demo generated from https://start.spring.io with apollo-client-config-data dependency

<dependency>
	<groupId>com.ctrip.framework.apollo</groupId>
	<artifactId>apollo-client-config-data</artifactId>
	<version>1.9.0-SNAPSHOT</version>
</dependency>

demo.zip

@nobodyiam

Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, please also update the changes.md

@lonre
Copy link
Contributor Author

lonre commented Aug 7, 2021

Thanks, please also update the changes.md

@nobodyiam Done

@lonre lonre requested a review from nobodyiam August 7, 2021 12:49
Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nobodyiam nobodyiam merged commit 8c0241c into apolloconfig:master Aug 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2021
@nobodyiam nobodyiam added this to the 1.9.0 milestone Aug 8, 2021
@lonre lonre deleted the patch-4 branch April 11, 2022 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants