Skip to content

Conversation

@hrybs
Copy link
Contributor

@hrybs hrybs commented Apr 13, 2021

There are 2 main approaches how to use @Configuration annotation:

  1. When proxyBeanMethods attribute is true then a CGLIB proxy is created. In this case the visibility of a @Bean annotated method can be anything except private.
  2. When proxyBeanMethods attribute is false then no CGLIB proxy is created. In this case the visibility of a @Bean annotated method can be anything including private.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 13, 2021
@sbrannen sbrannen self-assigned this Apr 14, 2021
@sbrannen sbrannen added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 14, 2021
@sbrannen sbrannen added this to the 5.3.7 milestone Apr 14, 2021
@sbrannen
Copy link
Member

I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.

@sbrannen sbrannen changed the title fix Bean annotation description Improve ref docs regarding @Bean method visibility constraints Apr 20, 2021
@sbrannen sbrannen merged commit e03fdea into spring-projects:master Apr 20, 2021
@sbrannen
Copy link
Member

This has been merged into master.

Thanks

lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this pull request Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants