`@Around("com.xyz.CommonPointcuts.businessService()")` references the `businessService` named pointcut defined in xref:core/aop/ataspectj/pointcuts.adoc#aop-common-pointcuts[Sharing Named Pointcut Definitions].
`@Around("com.xyz.CommonPointcuts.businessService()")` references the `businessService` named pointcut defined in
xref:core/aop/ataspectj/pointcuts.adoc#aop-common-pointcuts[Sharing Named Pointcut Definitions].
Note that the aspect implements the `Ordered` interface so that we can set the precedence of
Note that the aspect implements the `Ordered` interface so that we can set the precedence of
the aspect higher than the transaction advice (we want a fresh transaction each time we
the aspect higher than the transaction advice (we want a fresh transaction each time we
The following example shows how to specify an argument name in XML:
The following example shows how to specify an argument name in XML:
[source,xml,indent=0,subs="verbatim"]
[source,xml,indent=0,subs="verbatim"]
@ -464,7 +456,8 @@ The following example shows how to specify an argument name in XML:
method="audit"
method="audit"
arg-names="auditable" />
arg-names="auditable" />
----
----
<1> References the `publicMethod` named pointcut defined in xref:core/aop/ataspectj/pointcuts.adoc#aop-pointcuts-combining[Combining Pointcut Expressions].
<1> References the `publicMethod` named pointcut defined in
Spring ships with a small AspectJ aspect library, which is available stand-alone in your
Spring ships with a small AspectJ aspect library, which is available stand-alone in your
distribution as `spring-aspects.jar`. You need to add this to your classpath in order
distribution as `spring-aspects.jar`. You need to add this to your classpath in order
to use the aspects in it. xref:core/aop/using-aspectj.adoc#aop-atconfigurable[Using AspectJ to Dependency Inject Domain Objects with Spring] and xref:core/aop/using-aspectj.adoc#aop-ajlib-other[Other Spring aspects for AspectJ] discuss the
to use the aspects in it.
content of this library and how you can use it. xref:core/aop/using-aspectj.adoc#aop-aj-configure[Configuring AspectJ Aspects by Using Spring IoC] discusses how to
xref:core/aop/using-aspectj.adoc#aop-atconfigurable[Using AspectJ to Dependency Inject Domain Objects with Spring]
dependency inject AspectJ aspects that are woven using the AspectJ compiler. Finally,
and xref:core/aop/using-aspectj.adoc#aop-ajlib-other[Other Spring aspects for AspectJ]
xref:core/aop/using-aspectj.adoc#aop-aj-ltw[Load-time Weaving with AspectJ in the Spring Framework] provides an introduction to load-time weaving for Spring applications
discuss the content of this library and how you can use it.
that use AspectJ.
xref:core/aop/using-aspectj.adoc#aop-aj-configure[Configuring AspectJ Aspects by Using Spring IoC]
discusses how to dependency inject AspectJ aspects that are woven using the AspectJ compiler. Finally,
xref:core/aop/using-aspectj.adoc#aop-aj-ltw[Load-time Weaving with AspectJ in the Spring Framework]
provides an introduction to load-time weaving for Spring applications that use AspectJ.
[[aop-atconfigurable]]
[[aop-atconfigurable]]
@ -206,7 +208,6 @@ not use `@Configurable` on bean classes that are registered as regular Spring be
with the container. Doing so results in double initialization, once through the
with the container. Doing so results in double initialization, once through the
container and once through the aspect.
container and once through the aspect.
[[aop-configurable-testing]]
[[aop-configurable-testing]]
=== Unit Testing `@Configurable` Objects
=== Unit Testing `@Configurable` Objects
@ -219,7 +220,6 @@ you can still unit test outside of the container as normal, but you see a warnin
message each time that you construct a `@Configurable` object indicating that it has
message each time that you construct a `@Configurable` object indicating that it has
not been configured by Spring.
not been configured by Spring.
[[aop-configurable-container]]
[[aop-configurable-container]]
=== Working with Multiple Application Contexts
=== Working with Multiple Application Contexts
@ -249,7 +249,6 @@ is added only to the container-wide classpath (and hence loaded by the shared pa
not what you want).
not what you want).
[[aop-ajlib-other]]
[[aop-ajlib-other]]
== Other Spring aspects for AspectJ
== Other Spring aspects for AspectJ
@ -302,7 +301,6 @@ fully qualified class names:
----
----
[[aop-aj-configure]]
[[aop-aj-configure]]
== Configuring AspectJ Aspects by Using Spring IoC
== Configuring AspectJ Aspects by Using Spring IoC
@ -357,7 +355,6 @@ results in the creation of Spring AOP proxies. The @AspectJ style of aspect
declaration is being used here, but the AspectJ runtime is not involved.
declaration is being used here, but the AspectJ runtime is not involved.
[[aop-aj-ltw]]
[[aop-aj-ltw]]
== Load-time Weaving with AspectJ in the Spring Framework
== Load-time Weaving with AspectJ in the Spring Framework
@ -391,7 +388,6 @@ LTW that uses Spring, followed by detailed specifics about elements introduced i
example. For a complete example, see the
example. For a complete example, see the
{petclinic-github-org}/spring-framework-petclinic[Petclinic sample application based on Spring Framework].
{petclinic-github-org}/spring-framework-petclinic[Petclinic sample application based on Spring Framework].
[[aop-aj-ltw-first-example]]
[[aop-aj-ltw-first-example]]
=== A First Example
=== A First Example
@ -677,7 +673,6 @@ nice example of a development-time aspect that developers can use during develop
and then easily exclude from builds of the application being deployed
and then easily exclude from builds of the application being deployed
into UAT or production.
into UAT or production.
[[aop-aj-ltw-the-aspects]]
[[aop-aj-ltw-the-aspects]]
=== Aspects
=== Aspects
@ -686,7 +681,6 @@ either the AspectJ language itself, or you can write your aspects in the @Aspect
Your aspects are then both valid AspectJ and Spring AOP aspects.
Your aspects are then both valid AspectJ and Spring AOP aspects.
Furthermore, the compiled aspect classes need to be available on the classpath.
Furthermore, the compiled aspect classes need to be available on the classpath.
[[aop-aj-ltw-aop_dot_xml]]
[[aop-aj-ltw-aop_dot_xml]]
=== `META-INF/aop.xml`
=== `META-INF/aop.xml`
@ -716,7 +710,6 @@ The structure and contents of this file is detailed in the LTW part of the
@ -5,6 +5,7 @@ This chapter covers Spring's Ahead of Time (AOT) optimizations.
For AOT support specific to integration tests, see xref:testing/testcontext-framework/aot.adoc[Ahead of Time Support for Tests].
For AOT support specific to integration tests, see xref:testing/testcontext-framework/aot.adoc[Ahead of Time Support for Tests].
[[aot.introduction]]
[[aot.introduction]]
== Introduction to Ahead of Time Optimizations
== Introduction to Ahead of Time Optimizations
@ -35,6 +36,7 @@ A Spring AOT processed application typically generates:
NOTE: At the moment, AOT is focused on allowing Spring applications to be deployed as native images using GraalVM.
NOTE: At the moment, AOT is focused on allowing Spring applications to be deployed as native images using GraalVM.
We intend to support more JVM-based use cases in future generations.
We intend to support more JVM-based use cases in future generations.
[[aot.basics]]
[[aot.basics]]
== AOT Engine Overview
== AOT Engine Overview
@ -51,6 +53,7 @@ The `RuntimeHints` instance can also be used to generate the relevant GraalVM na
Those steps are covered in greater detail in the sections below.
Those steps are covered in greater detail in the sections below.
[[aot.refresh]]
[[aot.refresh]]
== Refresh for AOT Processing
== Refresh for AOT Processing
@ -88,6 +91,7 @@ This makes sure to create any proxy that will be required at runtime.
Once this part completes, the `BeanFactory` contains the bean definitions that are necessary for the application to run. It does not trigger bean instantiation but allows the AOT engine to inspect the beans that will be created at runtime.
Once this part completes, the `BeanFactory` contains the bean definitions that are necessary for the application to run. It does not trigger bean instantiation but allows the AOT engine to inspect the beans that will be created at runtime.
[[aot.bean-factory-initialization-contributions]]
[[aot.bean-factory-initialization-contributions]]
== Bean Factory Initialization AOT Contributions
== Bean Factory Initialization AOT Contributions
@ -110,7 +114,6 @@ We generally recommend that this interface is only implemented by infrastructure
If such a bean is registered using an `@Bean` factory method, ensure the method is `static` so that its enclosing `@Configuration` class does not have to be initialized.
If such a bean is registered using an `@Bean` factory method, ensure the method is `static` so that its enclosing `@Configuration` class does not have to be initialized.
====
====
[[aot.bean-registration-contributions]]
[[aot.bean-registration-contributions]]
=== Bean Registration AOT Contributions
=== Bean Registration AOT Contributions
@ -224,6 +227,7 @@ There is a bean definition for `dataSourceConfiguration` and one for `dataSource
When a `datasource` instance is required, a `BeanInstanceSupplier` is called.
When a `datasource` instance is required, a `BeanInstanceSupplier` is called.
This supplier invokes the `dataSource()` method on the `dataSourceConfiguration` bean.
This supplier invokes the `dataSource()` method on the `dataSourceConfiguration` bean.
[[aot.running]]
[[aot.running]]
== Running with AOT Optimizations
== Running with AOT Optimizations
@ -235,6 +239,7 @@ NOTE: When AOT optimizations are included, some decisions that have been made at
are hard coded in the application setup. For instance, profiles that have been enabled at
are hard coded in the application setup. For instance, profiles that have been enabled at
build time are automatically enabled at runtime as well.
build time are automatically enabled at runtime as well.
[[aot.bestpractices]]
[[aot.bestpractices]]
== Best Practices
== Best Practices
@ -564,6 +569,7 @@ Kotlin::
----
----
======
======
[[aot.hints]]
[[aot.hints]]
== Runtime Hints
== Runtime Hints
@ -598,7 +604,6 @@ For instance, the return type of a `@Controller` method is inspected, and releva
For cases that the core container cannot infer, you can register such hints programmatically.
For cases that the core container cannot infer, you can register such hints programmatically.
A number of convenient annotations are also provided for common use cases.
A number of convenient annotations are also provided for common use cases.
[[aot.hints.import-runtime-hints]]
[[aot.hints.import-runtime-hints]]
=== `@ImportRuntimeHints`
=== `@ImportRuntimeHints`
@ -616,7 +621,6 @@ This way, if the component is not contributed to the `BeanFactory`, the hints wi
It is also possible to register an implementation statically by adding an entry in `META-INF/spring/aot.factories` with a key equal to the fully-qualified name of the `RuntimeHintsRegistrar` interface.
It is also possible to register an implementation statically by adding an entry in `META-INF/spring/aot.factories` with a key equal to the fully-qualified name of the `RuntimeHintsRegistrar` interface.
[[aot.hints.reflective]]
[[aot.hints.reflective]]
=== `@Reflective`
=== `@Reflective`
@ -639,7 +643,6 @@ This can be tuned by specifying a custom `ReflectiveProcessor` implementation vi
Library authors can reuse this annotation for their own purposes.
Library authors can reuse this annotation for their own purposes.
An example of such customization is covered in the next section.
An example of such customization is covered in the next section.
If no `list-class` attribute is supplied, the container chooses a `List` implementation.
If no `list-class` attribute is supplied, the container chooses a `List` implementation.
[[xsd-schemas-util-map]]
[[xsd-schemas-util-map]]
=== Using `<util:map/>`
=== Using `<util:map/>`
@ -444,7 +438,6 @@ following configuration:
If no `'map-class'` attribute is supplied, the container chooses a `Map` implementation.
If no `'map-class'` attribute is supplied, the container chooses a `Map` implementation.
[[xsd-schemas-util-set]]
[[xsd-schemas-util-set]]
=== Using `<util:set/>`
=== Using `<util:set/>`
@ -500,7 +493,6 @@ following configuration:
If no `set-class` attribute is supplied, the container chooses a `Set` implementation.
If no `set-class` attribute is supplied, the container chooses a `Set` implementation.
[[xsd-schemas-aop]]
[[xsd-schemas-aop]]
== The `aop` Schema
== The `aop` Schema
@ -530,7 +522,6 @@ are available to you):
----
----
[[xsd-schemas-context]]
[[xsd-schemas-context]]
== The `context` Schema
== The `context` Schema
@ -555,7 +546,6 @@ available to you:
</beans>
</beans>
----
----
[[xsd-schemas-context-pphc]]
[[xsd-schemas-context-pphc]]
=== Using `<property-placeholder/>`
=== Using `<property-placeholder/>`
@ -599,34 +589,25 @@ element for that purpose. Similarly, Spring's
xref:integration/cache/annotations.adoc[caching annotations] need to be explicitly
xref:integration/cache/annotations.adoc[caching annotations] need to be explicitly
xref:integration/cache/annotations.adoc#cache-annotation-enable[enabled] as well.
xref:integration/cache/annotations.adoc#cache-annotation-enable[enabled] as well.
[[xsd-schemas-context-component-scan]]
[[xsd-schemas-context-component-scan]]
=== Using `<component-scan/>`
=== Using `<component-scan/>`
This element is detailed in the section on xref:core/beans/annotation-config.adoc[annotation-based container configuration]
This element is detailed in the section on xref:core/beans/annotation-config.adoc[annotation-based container configuration].
.
[[xsd-schemas-context-ltw]]
[[xsd-schemas-context-ltw]]
=== Using `<load-time-weaver/>`
=== Using `<load-time-weaver/>`
This element is detailed in the section on xref:core/aop/using-aspectj.adoc#aop-aj-ltw[load-time weaving with AspectJ in the Spring Framework]
This element is detailed in the section on xref:core/aop/using-aspectj.adoc#aop-aj-ltw[load-time weaving with AspectJ in the Spring Framework].
.
[[xsd-schemas-context-sc]]
[[xsd-schemas-context-sc]]
=== Using `<spring-configured/>`
=== Using `<spring-configured/>`
This element is detailed in the section on xref:core/aop/using-aspectj.adoc#aop-atconfigurable[using AspectJ to dependency inject domain objects with Spring]
This element is detailed in the section on xref:core/aop/using-aspectj.adoc#aop-atconfigurable[using AspectJ to dependency inject domain objects with Spring].
.
[[xsd-schemas-context-mbe]]
[[xsd-schemas-context-mbe]]
=== Using `<mbean-export/>`
=== Using `<mbean-export/>`
This element is detailed in the section on xref:integration/jmx/naming.adoc#jmx-context-mbeanexport[configuring annotation-based MBean export]
This element is detailed in the section on xref:integration/jmx/naming.adoc#jmx-context-mbeanexport[configuring annotation-based MBean export].
.
[[xsd-schemas-beans]]
[[xsd-schemas-beans]]
@ -666,7 +647,3 @@ as it stands).
In the case of the preceding example, you could assume that there is some logic that consumes
In the case of the preceding example, you could assume that there is some logic that consumes
the bean definition and sets up some caching infrastructure that uses the supplied metadata.
the bean definition and sets up some caching infrastructure that uses the supplied metadata.
architectures that build upon the well-known Spring programming model.
architectures that build upon the well-known Spring programming model.
[[context-functionality-events-annotation]]
[[context-functionality-events-annotation]]
=== Annotation-based Event Listeners
=== Annotation-based Event Listeners
@ -707,7 +704,6 @@ The `handleBlockedListEvent()` method publishes a new `ListUpdateEvent` for ever
`BlockedListEvent` that it handles. If you need to publish several events, you can return
`BlockedListEvent` that it handles. If you need to publish several events, you can return
a `Collection` or an array of events instead.
a `Collection` or an array of events instead.
[[context-functionality-events-async]]
[[context-functionality-events-async]]
=== Asynchronous Listeners
=== Asynchronous Listeners
@ -754,7 +750,6 @@ Be aware of the following limitations when using asynchronous events:
See xref:integration/observability.adoc#observability.application-events[the `@EventListener` Observability section]
See xref:integration/observability.adoc#observability.application-events[the `@EventListener` Observability section]
for more information on Observability concerns.
for more information on Observability concerns.
[[context-functionality-events-order]]
[[context-functionality-events-order]]
=== Ordering Listeners
=== Ordering Listeners
@ -786,7 +781,6 @@ Kotlin::
----
----
======
======
[[context-functionality-events-generics]]
[[context-functionality-events-generics]]
=== Generic Events
=== Generic Events
@ -880,7 +874,6 @@ for example, for processing all events asynchronously and/or for handling listen
----
----
[[context-functionality-resources]]
[[context-functionality-resources]]
== Convenient Access to Low-level Resources
== Convenient Access to Low-level Resources
@ -913,7 +906,6 @@ with special prefixes to force loading of definitions from the classpath or a UR
regardless of the actual context type.
regardless of the actual context type.
[[context-functionality-startup]]
[[context-functionality-startup]]
== Application Startup Tracking
== Application Startup Tracking
@ -990,6 +982,7 @@ or ask for the `ApplicationStartup` type on any injection point.
NOTE: Developers should not use the `"spring.*"` namespace when creating custom startup steps.
NOTE: Developers should not use the `"spring.*"` namespace when creating custom startup steps.
This namespace is reserved for internal Spring usage and is subject to change.
This namespace is reserved for internal Spring usage and is subject to change.
[[context-create]]
[[context-create]]
== Convenient ApplicationContext Instantiation for Web Applications
== Convenient ApplicationContext Instantiation for Web Applications
@ -1022,7 +1015,6 @@ Examples are `/WEB-INF/{asterisk}Context.xml` (for all files with names that end
(for all such files in any subdirectory of `WEB-INF`).
(for all such files in any subdirectory of `WEB-INF`).
[[context-deploy-rar]]
[[context-deploy-rar]]
== Deploying a Spring `ApplicationContext` as a Jakarta EE RAR File
== Deploying a Spring `ApplicationContext` as a Jakarta EE RAR File
@ -1053,7 +1045,8 @@ all application classes into a RAR file (which is a standard JAR file with a dif
file extension).
file extension).
. Add all required library JARs into the root of the RAR archive.
. Add all required library JARs into the root of the RAR archive.
. Add a
. Add a
`META-INF/ra.xml` deployment descriptor (as shown in the {spring-framework-api}/jca/context/SpringContextResourceAdapter.html[javadoc for `SpringContextResourceAdapter`])
`META-INF/ra.xml` deployment descriptor (as shown in the
{spring-framework-api}/jca/context/SpringContextResourceAdapter.html[javadoc for `SpringContextResourceAdapter`])
and the corresponding Spring XML bean definition file(s) (typically
and the corresponding Spring XML bean definition file(s) (typically
`META-INF/applicationContext.xml`).
`META-INF/applicationContext.xml`).
. Drop the resulting RAR file into your
. Drop the resulting RAR file into your
@ -1066,7 +1059,3 @@ other modules. A RAR-based `ApplicationContext` may also, for example, schedule
or react to new files in the file system (or the like). If it needs to allow synchronous
or react to new files in the file system (or the like). If it needs to allow synchronous
access from the outside, it could (for example) export RMI endpoints, which may be used
access from the outside, it could (for example) export RMI endpoints, which may be used
javadoc for more detail. For more on AspectJ load-time weaving, see xref:core/aop/using-aspectj.adoc#aop-aj-ltw[Load-time Weaving with AspectJ in the Spring Framework].
javadoc for more detail. For more on AspectJ load-time weaving, see
xref:core/aop/using-aspectj.adoc#aop-aj-ltw[Load-time Weaving with AspectJ in the Spring Framework].
@ -74,7 +74,6 @@ lead to concurrent access exceptions, inconsistent state in the bean container,
====
====
[[beans-definition-overriding]]
[[beans-definition-overriding]]
== Overriding Beans
== Overriding Beans
@ -104,7 +103,6 @@ explicit support for this as of Spring Framework 6.2. Please refer to
xref:testing/testcontext-framework/bean-overriding.adoc[this section] for more details.
xref:testing/testcontext-framework/bean-overriding.adoc[this section] for more details.
[[beans-beanname]]
[[beans-beanname]]
== Naming Beans
== Naming Beans
@ -147,7 +145,6 @@ case when there is more than one character and both the first and second charact
are upper case, the original casing gets preserved. These are the same rules as
are upper case, the original casing gets preserved. These are the same rules as
defined by `java.beans.Introspector.decapitalize` (which Spring uses here).
defined by `java.beans.Introspector.decapitalize` (which Spring uses here).
[[beans-beanname-alias]]
[[beans-beanname-alias]]
=== Aliasing a Bean outside the Bean Definition
=== Aliasing a Bean outside the Bean Definition
@ -197,7 +194,6 @@ See xref:core/beans/java/bean-annotation.adoc[Using the `@Bean` Annotation] for
****
****
[[beans-factory-class]]
[[beans-factory-class]]
== Instantiating Beans
== Instantiating Beans
@ -209,7 +205,8 @@ If you use XML-based configuration metadata, you specify the type (or class) of
that is to be instantiated in the `class` attribute of the `<bean/>` element. This
that is to be instantiated in the `class` attribute of the `<bean/>` element. This
`class` attribute (which, internally, is a `Class` property on a `BeanDefinition`
`class` attribute (which, internally, is a `Class` property on a `BeanDefinition`
instance) is usually mandatory. (For exceptions, see
instance) is usually mandatory. (For exceptions, see
xref:core/beans/definition.adoc#beans-factory-class-instance-factory-method[Instantiation by Using an Instance Factory Method] and xref:core/beans/child-bean-definitions.adoc[Bean Definition Inheritance].)
xref:core/beans/definition.adoc#beans-factory-class-instance-factory-method[Instantiation by Using an Instance Factory Method]
and xref:core/beans/child-bean-definitions.adoc[Bean Definition Inheritance].)
You can use the `Class` property in one of two ways:
You can use the `Class` property in one of two ways:
* Typically, to specify the bean class to be constructed in the case where the container
* Typically, to specify the bean class to be constructed in the case where the container
@ -233,7 +230,6 @@ a bean definition would be `com.example.SomeThing$OtherThing` or
`com.example.SomeThing.OtherThing`.
`com.example.SomeThing.OtherThing`.
****
****
[[beans-factory-class-ctor]]
[[beans-factory-class-ctor]]
=== Instantiation with a Constructor
=== Instantiation with a Constructor
@ -268,7 +264,6 @@ NOTE: In the case of constructor arguments, the container can select a correspon
constructor among several overloaded constructors. That said, to avoid ambiguities,
constructor among several overloaded constructors. That said, to avoid ambiguities,
it is recommended to keep your constructor signatures as straightforward as possible.
it is recommended to keep your constructor signatures as straightforward as possible.
[[beans-factory-class-static-factory-method]]
[[beans-factory-class-static-factory-method]]
=== Instantiation with a Static Factory Method
=== Instantiation with a Static Factory Method
@ -346,7 +341,6 @@ overloads of the `mock` method. Choose the most specific variant of `mock` possi
----
----
====
====
[[beans-factory-class-instance-factory-method]]
[[beans-factory-class-instance-factory-method]]
=== Instantiation by Using an Instance Factory Method
=== Instantiation by Using an Instance Factory Method
@ -16,8 +16,9 @@ not know the location or class of the dependencies. As a result, your classes be
to test, particularly when the dependencies are on interfaces or abstract base classes,
to test, particularly when the dependencies are on interfaces or abstract base classes,
which allow for stub or mock implementations to be used in unit tests.
which allow for stub or mock implementations to be used in unit tests.
DI exists in two major variants: xref:core/beans/dependencies/factory-collaborators.adoc#beans-constructor-injection[Constructor-based dependency injection]
DI exists in two major variants:
and xref:core/beans/dependencies/factory-collaborators.adoc#beans-setter-injection[Setter-based dependency injection].
As mentioned in the xref:core/beans/dependencies/factory-collaborators.adoc[previous section], you can define bean
As mentioned in the xref:core/beans/dependencies/factory-collaborators.adoc[previous section],
properties and constructor arguments as references to other managed beans (collaborators)
you can define bean properties and constructor arguments as references to other managed beans
or as values defined inline. Spring's XML-based configuration metadata supports
(collaborators) or as values defined inline. Spring's XML-based configuration metadata supports
sub-element types within its `<property/>` and `<constructor-arg/>` elements for this
sub-element types within its `<property/>` and `<constructor-arg/>` elements for this purpose.
purpose.
[[beans-value-element]]
[[beans-value-element]]
@ -544,9 +543,10 @@ three approaches at the same time.
[[beans-c-namespace]]
[[beans-c-namespace]]
== XML Shortcut with the c-namespace
== XML Shortcut with the c-namespace
Similar to the xref:core/beans/dependencies/factory-properties-detailed.adoc#beans-p-namespace[XML Shortcut with the p-namespace], the c-namespace, introduced in Spring
Similar to the
3.1, allows inlined attributes for configuring the constructor arguments rather
xref:core/beans/dependencies/factory-properties-detailed.adoc#beans-p-namespace[XML Shortcut with the p-namespace],
then nested `constructor-arg` elements.
the c-namespace, introduced in Spring 3.1, allows inlined attributes for configuring
the constructor arguments rather then nested `constructor-arg` elements.
The following example uses the `c:` namespace to do the same thing as the from
The following example uses the `c:` namespace to do the same thing as the from
@ -30,11 +30,8 @@ implementations. They are also discussed in this chapter.
Spring supports Java Bean Validation through setup infrastructure and an adaptor to
Spring supports Java Bean Validation through setup infrastructure and an adaptor to
Spring's own `Validator` contract. Applications can enable Bean Validation once globally,
Spring's own `Validator` contract. Applications can enable Bean Validation once globally,
as described in xref:core/validation/beanvalidation.adoc[Java Bean Validation], and use it exclusively for all validation
as described in xref:core/validation/beanvalidation.adoc[Java Bean Validation], and use
needs. In the web layer, applications can further register controller-local Spring
it exclusively for all validation needs. In the web layer, applications can further
`Validator` instances per `DataBinder`, as described in xref:core/validation/beanvalidation.adoc#validation-binder[Configuring a `DataBinder`], which can
register controller-local Spring `Validator` instances per `DataBinder`, as described in
be useful for plugging in custom validation logic.
xref:core/validation/beanvalidation.adoc#validation-binder[Configuring a `DataBinder`],
which can be useful for plugging in custom validation logic.
@ -8,7 +8,9 @@ and its various callback interfaces, plus a variety of related classes. A subpac
named `org.springframework.jdbc.core.simple` contains the `SimpleJdbcInsert` and
named `org.springframework.jdbc.core.simple` contains the `SimpleJdbcInsert` and
`SimpleJdbcCall` classes. Another subpackage named
`SimpleJdbcCall` classes. Another subpackage named
`org.springframework.jdbc.core.namedparam` contains the `NamedParameterJdbcTemplate`
`org.springframework.jdbc.core.namedparam` contains the `NamedParameterJdbcTemplate`
class and the related support classes. See xref:data-access/jdbc/core.adoc[Using the JDBC Core Classes to Control Basic JDBC Processing and Error Handling], xref:data-access/jdbc/advanced.adoc[JDBC Batch Operations], and
class and the related support classes. See
xref:data-access/jdbc/core.adoc[Using the JDBC Core Classes to Control Basic JDBC Processing and Error Handling],
xref:data-access/jdbc/advanced.adoc[JDBC Batch Operations], and
xref:data-access/jdbc/simple.adoc[Simplifying JDBC Operations with the `SimpleJdbc` Classes].
xref:data-access/jdbc/simple.adoc[Simplifying JDBC Operations with the `SimpleJdbc` Classes].
* `datasource`: The `org.springframework.jdbc.datasource` package contains a utility class
* `datasource`: The `org.springframework.jdbc.datasource` package contains a utility class
@ -16,7 +18,8 @@ for easy `DataSource` access and various simple `DataSource` implementations tha
use for testing and running unmodified JDBC code outside of a Jakarta EE container. A subpackage
use for testing and running unmodified JDBC code outside of a Jakarta EE container. A subpackage
named `org.springframework.jdbc.datasource.embedded` provides support for creating
named `org.springframework.jdbc.datasource.embedded` provides support for creating
embedded databases by using Java database engines, such as HSQL, H2, and Derby. See
embedded databases by using Java database engines, such as HSQL, H2, and Derby. See
xref:data-access/jdbc/connections.adoc[Controlling Database Connections] and xref:data-access/jdbc/embedded-database-support.adoc[Embedded Database Support].
xref:data-access/jdbc/connections.adoc[Controlling Database Connections] and