Skip to content

Merge source and substitution configuration in reference docs #25545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/docs/asciidoc/core/core-appendix.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,7 @@ XML extension (a custom XML element) that lets us configure objects of the type
`SimpleDateFormat` (from the `java.text` package). When we are done,
we will be able to define bean definitions of type `SimpleDateFormat` as follows:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<myns:dateformat id="dateFormat"
pattern="yyyy-MM-dd HH:mm"
Expand Down
12 changes: 4 additions & 8 deletions src/docs/asciidoc/core/core-beans.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ dependency-inject domain objects with Spring>>.

The following example shows the basic structure of XML-based configuration metadata:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand Down Expand Up @@ -1980,8 +1979,7 @@ then nested `constructor-arg` elements.
The following example uses the `c:` namespace to do the same thing as the from
<<beans-constructor-injection>>:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -3428,8 +3426,7 @@ you can use the `init-method` attribute to specify the name of the method that h
no-argument signature. With Java configuration, you can use the `initMethod` attribute of
`@Bean`. See <<beans-java-lifecycle-callbacks>>. Consider the following example:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="exampleInitBean" class="examples.ExampleBean" init-method="init"/>
----
Expand Down Expand Up @@ -7851,8 +7848,7 @@ To enable component scanning, you can annotate your `@Configuration` class as fo
Experienced Spring users may be familiar with the XML declaration equivalent from
Spring's `context:` namespace, shown in the following example:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<beans>
<context:component-scan base-package="com.acme"/>
Expand Down
6 changes: 2 additions & 4 deletions src/docs/asciidoc/data-access-appendix.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ the following preamble at the top of your Spring XML configuration file. The tex
following snippet references the correct schema so that the tags in the `tx` namespace
are available to you:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand Down Expand Up @@ -72,8 +71,7 @@ To use the elements in the `jdbc` schema, you need to have the following preambl
top of your Spring XML configuration file. The text in the following snippet references
the correct schema so that the elements in the `jdbc` namespace are available to you:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand Down
3 changes: 1 addition & 2 deletions src/docs/asciidoc/data-access.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8777,8 +8777,7 @@ You can configure marshallers more concisely by using tags from the OXM namespac
make these tags available, you must first reference the appropriate schema in the
preamble of the XML configuration file. The following example shows how to do so:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand Down
51 changes: 17 additions & 34 deletions src/docs/asciidoc/integration-appendix.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ To use the elements in the `jee` schema, you need to have the following preamble
of your Spring XML configuration file. The text in the following snippet references the
correct schema so that the elements in the `jee` namespace are available to you:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand All @@ -43,8 +42,7 @@ correct schema so that the elements in the `jee` namespace are available to you:

The following example shows how to use JNDI to look up a data source without the `jee` schema:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/MyDataSource"/>
Expand All @@ -58,8 +56,7 @@ The following example shows how to use JNDI to look up a data source without the
The following example shows how to use JNDI to look up a data source with the `jee`
schema:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/MyDataSource"/>

Expand All @@ -77,8 +74,7 @@ schema:
The following example shows how to use JNDI to look up an environment variable without
`jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="simple" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/MyDataSource"/>
Expand All @@ -92,8 +88,7 @@ The following example shows how to use JNDI to look up an environment variable w

The following example shows how to use JNDI to look up an environment variable with `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:jndi-lookup id="simple" jndi-name="jdbc/MyDataSource">
<jee:environment>ping=pong</jee:environment>
Expand All @@ -107,8 +102,7 @@ The following example shows how to use JNDI to look up an environment variable w
The following example shows how to use JNDI to look up multiple environment variables
without `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="simple" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/MyDataSource"/>
Expand All @@ -124,8 +118,7 @@ without `jee`:
The following example shows how to use JNDI to look up multiple environment variables with
`jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:jndi-lookup id="simple" jndi-name="jdbc/MyDataSource">
<!-- newline-separated, key-value pairs for the environment (standard Properties format) -->
Expand All @@ -143,8 +136,7 @@ The following example shows how to use JNDI to look up multiple environment vari
The following example shows how to use JNDI to look up a data source and a number of
different properties without `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="simple" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/MyDataSource"/>
Expand All @@ -159,8 +151,7 @@ different properties without `jee`:
The following example shows how to use JNDI to look up a data source and a number of
different properties with `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:jndi-lookup id="simple"
jndi-name="jdbc/MyDataSource"
Expand All @@ -181,8 +172,7 @@ The `<jee:local-slsb/>` element configures a reference to a local EJB Stateless
The following example shows how to configures a reference to a local EJB Stateless Session Bean
without `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="simple"
class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
Expand All @@ -194,8 +184,7 @@ without `jee`:
The following example shows how to configures a reference to a local EJB Stateless Session Bean
with `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:local-slsb id="simpleSlsb" jndi-name="ejb/RentalServiceBean"
business-interface="com.foo.service.RentalService"/>
Expand All @@ -211,8 +200,7 @@ The `<jee:local-slsb/>` element configures a reference to a local EJB Stateless
The following example shows how to configures a reference to a local EJB Stateless Session Bean
and a number of properties without `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="complexLocalEjb"
class="org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean">
Expand All @@ -227,8 +215,7 @@ and a number of properties without `jee`:
The following example shows how to configures a reference to a local EJB Stateless Session Bean
and a number of properties with `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:local-slsb id="complexLocalEjb"
jndi-name="ejb/RentalServiceBean"
Expand All @@ -247,8 +234,7 @@ The `<jee:remote-slsb/>` element configures a reference to a `remote` EJB Statel
The following example shows how to configures a reference to a remote EJB Stateless Session Bean
without `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<bean id="complexRemoteEjb"
class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
Expand All @@ -265,8 +251,7 @@ without `jee`:
The following example shows how to configures a reference to a remote EJB Stateless Session Bean
with `jee`:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<jee:remote-slsb id="complexRemoteEjb"
jndi-name="ejb/MyRemoteBean"
Expand Down Expand Up @@ -294,8 +279,7 @@ the following preamble at the top of your Spring XML configuration file. The tex
following snippet references the correct schema so that the elements in the `jms` namespace
are available to you:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand Down Expand Up @@ -332,8 +316,7 @@ To use the elements in the `cache` schema, you need to have the following preamb
top of your Spring XML configuration file. The text in the following snippet references
the correct schema so that the elements in the `cache` namespace are available to you:

[source,xml,indent=0]
[subs="verbatim,quotes"]
[source,xml,indent=0,subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
Expand Down
Loading