Browse Source

Revamp documentation to prioritize Java/Annotation-Based configuration over XML (#35446)

Signed-off-by: albonidrizi <albonidrizi@gmail.com>
pull/36011/head
albonidrizi 6 days ago
parent
commit
69261dce8a
  1. 7
      framework-docs/modules/ROOT/pages/core/beans/basics.adoc

7
framework-docs/modules/ROOT/pages/core/beans/basics.adoc

@ -50,6 +50,13 @@ xref:core/beans/java.adoc[Java-based configuration] for their Spring application @@ -50,6 +50,13 @@ xref:core/beans/java.adoc[Java-based configuration] for their Spring application
{spring-framework-api}/context/annotation/Import.html[`@Import`],
and {spring-framework-api}/context/annotation/DependsOn.html[`@DependsOn`] annotations.
[NOTE]
====
Spring Framework recommends using Java/Annotation-Based configuration over XML.
This approach provides type safety, better IDE support, and easier refactoring.
XML configuration is still supported for legacy scenarios.
====
Spring configuration consists of at least one and typically more than one bean definition
that the container must manage. Java configuration typically uses `@Bean`-annotated
methods within a `@Configuration` class, each corresponding to one bean definition.

Loading…
Cancel
Save