@@ -95,7 +95,7 @@ For instance, the following example loads a YAML configuration file from the cla
9595
9696[source,java,indent=0]
9797----
98- include::{code-examples}/context /EnvironmentPostProcessorExample.java[tag=example ]
98+ include::{include-howto}/springbootapplication /EnvironmentPostProcessorExample.java[tag=* ]
9999----
100100
101101TIP: The `Environment` has already been prepared with all the usual property sources that Spring Boot loads by default.
@@ -931,7 +931,7 @@ You can add an `org.apache.catalina.connector.Connector` to the `TomcatServletWe
931931
932932[source,java,indent=0,subs="verbatim,quotes,attributes"]
933933----
934- include::{code-examples}/context/embedded/ TomcatMultipleConnectorsExample.java[tag=configuration ]
934+ include::{include-howto}/embeddedwebservers/ TomcatMultipleConnectorsExample.java[tag=* ]
935935----
936936
937937
@@ -951,7 +951,7 @@ To switch to the `LegacyCookieProcessor`, use an `WebServerFactoryCustomizer` be
951951
952952[source,java,indent=0]
953953----
954- include::{code-examples}/context/embedded/ TomcatLegacyCookieProcessorExample.java[tag=customizer ]
954+ include::{include-howto}/embeddedwebservers/ TomcatLegacyCookieProcessorExample.java[tag=* ]
955955----
956956
957957
@@ -978,7 +978,7 @@ Add an `UndertowBuilderCustomizer` to the `UndertowServletWebServerFactory` and
978978
979979[source,java,indent=0,subs="verbatim,quotes,attributes"]
980980----
981- include::{code-examples}/context/embedded/ UndertowMultipleListenersExample.java[tag=configuration ]
981+ include::{include-howto}/embeddedwebservers/ UndertowMultipleListenersExample.java[tag=* ]
982982----
983983
984984
@@ -1283,7 +1283,7 @@ The `jersey.config.server.response.setStatusOverSendError` property must be set
12831283
12841284[source,java,indent=0]
12851285----
1286- include::{code-examples }/jersey/JerseySetStatusOverSendErrorExample.java[tag=resource-config ]
1286+ include::{include-howto }/jersey/JerseySetStatusOverSendErrorExample.java[tag=* ]
12871287----
12881288
12891289
@@ -1326,7 +1326,7 @@ The following example configures `HttpComponentsClientRequestFactory` with an `H
13261326
13271327[source,java,indent=0]
13281328----
1329- include::{code-examples}/web/client/ RestTemplateProxyCustomizationExample.java[tag=customizer ]
1329+ include::{include-springbootfeatures}/resttemplate/ RestTemplateProxyCustomizationExample.java[tag=* ]
13301330----
13311331
13321332[[howto-webclient-reactor-netty-customization]]
@@ -1337,7 +1337,7 @@ The following example configures a 60 second connect timeout and adds a `ReadTim
13371337
13381338[source,java,indent=0]
13391339----
1340- include::{code-examples}/web/reactive/function/client/ ReactorNettyClientCustomizationExample.java[tag=custom-http-connector ]
1340+ include::{include-howto}/httpclients/ ReactorNettyClientCustomizationExample.java[tag=* ]
13411341----
13421342
13431343TIP: Note the use of `ReactorResourceFactory` for the connection provider and event loop resources.
@@ -1582,7 +1582,7 @@ The following example shows how to create a data source by using a `DataSourceBu
15821582
15831583[source,java,indent=0,subs="verbatim,quotes,attributes"]
15841584----
1585- include::{code-examples}/jdbc /BasicDataSourceExample.java[tag=configuration ]
1585+ include::{include-howto}/dataaccess /BasicDataSourceExample.java[tag=* ]
15861586----
15871587
15881588To run an app with that `DataSource`, all you need is the connection information.
@@ -1623,7 +1623,7 @@ The following example shows how create a `HikariDataSource` with `DataSourceBuil
16231623
16241624[source,java,indent=0,subs="verbatim,quotes,attributes"]
16251625----
1626- include::{code-examples}/jdbc /SimpleDataSourceExample.java[tag=configuration ]
1626+ include::{include-howto}/dataaccess /SimpleDataSourceExample.java[tag=* ]
16271627----
16281628
16291629You can even go further by leveraging what `DataSourceProperties` does for you -- that is, by providing a default embedded database with a sensible username and password if no URL is provided.
@@ -1633,7 +1633,7 @@ To avoid that, you can redefine a custom `DataSourceProperties` on your custom n
16331633
16341634[source,java,indent=0,subs="verbatim,quotes,attributes"]
16351635----
1636- include::{code-examples}/jdbc /ConfigurableDataSourceExample.java[tag=configuration ]
1636+ include::{include-howto}/dataaccess /ConfigurableDataSourceExample.java[tag=* ]
16371637----
16381638
16391639This setup puts you _in sync_ with what Spring Boot does for you by default, except that a dedicated connection pool is chosen (in code) and its settings are exposed in the `app.datasource.configuration` sub namespace.
@@ -1670,7 +1670,7 @@ In the following example, we provide the _exact_ same feature set as the auto-co
16701670
16711671[source,java,indent=0,subs="verbatim,quotes,attributes"]
16721672----
1673- include::{code-examples}/jdbc /SimpleTwoDataSourcesExample.java[tag=configuration ]
1673+ include::{include-howto}/dataaccess /SimpleTwoDataSourcesExample.java[tag=* ]
16741674----
16751675
16761676TIP: `firstDataSourceProperties` has to be flagged as `@Primary` so that the database initializer feature uses your copy (if you use the initializer).
@@ -1700,7 +1700,7 @@ You can apply the same concept to the secondary `DataSource` as well, as shown i
17001700
17011701[source,java,indent=0,subs="verbatim,quotes,attributes"]
17021702----
1703- include::{code-examples}/jdbc /CompleteTwoDataSourcesExample.java[tag=configuration ]
1703+ include::{include-howto}/dataaccess /CompleteTwoDataSourcesExample.java[tag=* ]
17041704----
17051705
17061706The preceding example configures two data sources on custom namespaces with the same logic as Spring Boot would use in auto-configuration.
@@ -1794,7 +1794,7 @@ This implementation provides the same table structure as Hibernate 4: all dots a
17941794
17951795[source,java,indent=0]
17961796----
1797- include::{code-examples}/jpa /CaseSensitiveSpringPhysicalNamingStrategyExample.java[tag=naming-strategy ]
1797+ include::{include-howto}/dataaccess /CaseSensitiveSpringPhysicalNamingStrategyExample.java[tag=* ]
17981798----
17991799
18001800If you prefer to use Hibernate 5's default instead, set the following property:
@@ -1828,7 +1828,7 @@ Then, add a `HibernatePropertiesCustomizer` bean as shown in the following examp
18281828
18291829[source,java,indent=0]
18301830----
1831- include::{code-examples}/jpa /HibernateSecondLevelCacheExample.java[tag=configuration ]
1831+ include::{include-howto}/dataaccess /HibernateSecondLevelCacheExample.java[tag=* ]
18321832----
18331833
18341834This customizer will configure Hibernate to use the same `CacheManager` as the one that the application uses.
@@ -1969,7 +1969,7 @@ For example, if you use Hibernate Search with Elasticsearch as its index manager
19691969
19701970[source,java,indent=0]
19711971----
1972- include::{code-examples}/elasticsearch /HibernateSearchElasticsearchExample.java[tag=configuration ]
1972+ include::{include-howto}/dataaccess /HibernateSearchElasticsearchExample.java[tag=* ]
19731973----
19741974
19751975
@@ -2066,7 +2066,7 @@ You can initialize the database on startup using SQL scripts as shown in the fol
20662066
20672067[source,java,indent=0]
20682068----
2069- include::{code-examples}/r2dbc /R2dbcDatabaseInitializationExample.java[tag=configuration ]
2069+ include::{include-howto}/dataaccess /R2dbcDatabaseInitializationExample.java[tag=* ]
20702070----
20712071
20722072Alternatively, you can configure either <<howto-execute-flyway-database-migrations-on-startup,Flyway>> or <<howto-execute-liquibase-database-migrations-on-startup,Liquibase>> to configure a `DataSource` for you for the duration of the migration.
@@ -2351,7 +2351,7 @@ The following example shows one way to write such an exporter:
23512351
23522352[source,java,indent=0,subs="verbatim,quotes,attributes"]
23532353----
2354- include::{code-examples}/actuate/metrics/ MetricsHealthMicrometerExportExample.java[tag=configuration ]
2354+ include::{include-howto}/actuator/ MetricsHealthMicrometerExportExample.java[tag=* ]
23552355----
23562356
23572357
0 commit comments