Expand explanation for the "lite" bean approach #29957
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: documentation
A documentation task
Milestone
In the Basic Concepts: @Bean and @Configuration section exists the following
Full @Configuration vs “lite” @Bean mode?
block with the following first paragraph:That big block does not contain none information about:
lite
bean approach exists?lite
bean approach is mandatory over thefull
approach? (Here should appear the differences between them)Now about sample/snippet code:
The
full
approach is:It is the classic and most known approach. About the
lite
approach, first its introduction:Introduction
And according with the big block shown above exists two ways
One
Therefore
Until here the
XSomething
class can be detected and managed by Spring thanks to the combination of@ComponentScan
together with@Component/@Service
, therefore@Bean
can be used by Spring too.Two
Here I am assuming the following:
Therefore the current documentation does not cover "two" through some snippet code the answer of the following question:
If the
@Bean
is totally isolated or is not declared with neither@Configuration
nor@Component
. So How@Bean
can be used by Spring?Please clarify two because is not clear in the current documentation - there is neither a snippet nor sample code about this approach, perhaps I misinterpreted the
or even in a plain old class
part.I already wrote a question on SO about the question 3 at:
But I think is valuable for the community put in that block - or create a dedicated section - explaining these 3 questions together.
Thanks in advance for your understanding.
The text was updated successfully, but these errors were encountered: