In the Basic Concepts: @Bean and @Configuration section exists the following Full @Configuration vs “lite” @Bean mode? block with the following first paragraph:

When @Bean methods are declared within classes that are not annotated with @Configuration, 
they are referred to as being processed in a “lite” mode. Bean methods declared in a @Component or
even in a plain old class are considered to be “lite”, with a different primary purpose of the 
containing class and a @Bean method being a sort of bonus there. For example, service components may 
expose management views to the container through an additional @Bean method on each applicable 
component class. In such scenarios, @Bean methods are a general-purpose factory method mechanism.

... more

That big block does not contain none information about:

  1. Why the lite bean approach exists?
  2. When the lite bean approach is mandatory over the full approach? (Here should appear the differences between them)

Now about sample/snippet code:

The full approach is:

@Configuration
class XConfig {

   @Bean
   X defineX(){
      ...
      return x;
   }

}

It is the classic and most known approach. About the lite approach, first its introduction:

Introduction

When @Bean methods are declared within classes that are not annotated with @Configuration

And according with the big block shown above exists two ways

One

Bean methods declared in a @Component

Therefore

@Component/@Service
class XSomething {

   ...

   @Bean
   X defineX(){
      ...
      return x;
   }

}

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

or even in a plain old class

Here I am assuming the following:

//No annotation
class XSomething {

   ...

   @Bean
   X defineX(){
      ...
      return x;
   }

}

Therefore the current documentation does not cover "two" through some snippet code the answer of the following question:

  1. How does Spring apply here the "lite" bean approach through a "plain old class"?

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.

Comment From: snicoll

perhaps I misinterpreted the or even in a plain old class part.

Yes. The purpose of plain old class was to refer to the fact that the target class does not need to be annotated with @Component as long as it is a bean. That bit could have been a bit more explicit but, on the other hand, the container does not do anything with "plain class". If you don't register it one way or the other (@Bean, @Import, class path scanning, programmatic registration, etc), then we won't touch it at all. If it's not a bean, it does not exist for the purpose of configuring the context.

The section is pretty explicit that lite mode is a "bonus" and has less features than regular configuration classes. I'll see what we can do to revisit that section to make it more obvious.