Here is an excerpt from not one but 2 books on Spring (identical!).
Starting with Spring 3.0, you can configure Spring metadata purely inside Java classes, completely avoiding any XML configuration while enhancing annotation-based metadata. You annotate any Java class with @Configuration annotation at the class level and have methods annotated as @Configuration annotation on a factory method that instantiates an @Component annotation, or any other specialized bean, to define your application context. Let's see a simple example:
from
Spring Essentials, and also from
Spring MVC: Designing Real World Web Applications.
I am omitting the example, but trying very hard to mention all the "diverse" sources I have read. ;-)
I have not used Spring since before annotations were introduced, but it looks like @Configuration is used to declare that something can later be used
as configuration.
Here's a third excerpt:
The @Configuration annotation hints that the contained class declares one or more @Bean definitions. The @Configuration annotation is meta-annotated with @Component; therefore, it is a candidate for component scanning.
from
Spring Microservices that seems a bit more succinct.
I hope this helps.