Skip to content

Commit 7e257dc

Browse files
committed
Rename packages for code samples to match sections
See gh-27132
1 parent ad8cb53 commit 7e257dc

File tree

83 files changed

+126
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+126
-125
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
[[actuator]]
23
= Production-ready Features
34
include::attributes.adoc[]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/nosql.adoc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The following listing shows an example of such a bean:
3838

3939
[source,java,indent=0,subs="verbatim"]
4040
----
41-
include::{docs-java}/features/nosql/redis/connecting/MyBean.java[]
41+
include::{docs-java}/data/nosql/redis/connecting/MyBean.java[]
4242
----
4343

4444
TIP: You can also register an arbitrary number of beans that implement `LettuceClientConfigurationBuilderCustomizer` for more advanced customizations.
@@ -66,7 +66,7 @@ The following example shows how to connect to a MongoDB database:
6666

6767
[source,java,indent=0,subs="verbatim"]
6868
----
69-
include::{docs-java}/features/nosql/mongodb/connecting/MyBean.java[]
69+
include::{docs-java}/data/nosql/mongodb/connecting/MyBean.java[]
7070
----
7171

7272
If you have defined your own `MongoClient`, it will be used to auto-configure a suitable `MongoDatabaseFactory`.
@@ -120,7 +120,7 @@ As with `JdbcTemplate`, Spring Boot auto-configures a bean for you to inject the
120120

121121
[source,java,indent=0,subs="verbatim"]
122122
----
123-
include::{docs-java}/features/nosql/mongodb/template/MyBean.java[]
123+
include::{docs-java}/data/nosql/mongodb/template/MyBean.java[]
124124
----
125125

126126
See the {spring-data-mongodb-api}/core/MongoOperations.html[`MongoOperations` Javadoc] for complete details.
@@ -137,7 +137,7 @@ You could take the JPA example from earlier and, assuming that `City` is now a M
137137

138138
[source,java,indent=0,subs="verbatim"]
139139
----
140-
include::{docs-java}/features/nosql/mongodb/repositories/CityRepository.java[]
140+
include::{docs-java}/data/nosql/mongodb/repositories/CityRepository.java[]
141141
----
142142

143143
TIP: You can customize document scanning locations by using the `@EntityScan` annotation.
@@ -182,7 +182,7 @@ The following example shows how to inject a Neo4j `Driver` that gives you access
182182

183183
[source,java,indent=0,subs="verbatim"]
184184
----
185-
include::{docs-java}/features/nosql/neo4j/connecting/MyBean.java[]
185+
include::{docs-java}/data/nosql/neo4j/connecting/MyBean.java[]
186186
----
187187

188188
You can configure various aspects of the driver using `spring.neo4j.*` properties.
@@ -214,7 +214,7 @@ You could take the JPA example from earlier and define `City` as Spring Data Neo
214214

215215
[source,java,indent=0,subs="verbatim"]
216216
----
217-
include::{docs-java}/features/nosql/neo4j/repositories/CityRepository.java[]
217+
include::{docs-java}/data/nosql/neo4j/repositories/CityRepository.java[]
218218
----
219219

220220
The `spring-boot-starter-data-neo4j` "`Starter`" enables the repository support as well as transaction management.
@@ -230,7 +230,7 @@ To enable transaction management, the following bean must be defined in your con
230230
231231
[source,java,indent=0,subs="verbatim"]
232232
----
233-
include::{docs-java}/features/nosql/neo4j/repositories/MyNeo4jConfiguration.java[]
233+
include::{docs-java}/data/nosql/neo4j/repositories/MyNeo4jConfiguration.java[]
234234
----
235235
====
236236

@@ -251,7 +251,7 @@ The following example shows how to inject a Solr bean:
251251

252252
[source,java,indent=0,subs="verbatim"]
253253
----
254-
include::{docs-java}/features/nosql/solr/connecting/MyBean.java[]
254+
include::{docs-java}/data/nosql/solr/connecting/MyBean.java[]
255255
----
256256

257257
If you add your own `@Bean` of type `SolrClient`, it replaces the default.
@@ -343,7 +343,7 @@ as shown in the following example:
343343

344344
[source,java,indent=0,subs="verbatim"]
345345
----
346-
include::{docs-java}/features/nosql/elasticsearch/connectingusingspringdata/MyBean.java[]
346+
include::{docs-java}/data/nosql/elasticsearch/connectingusingspringdata/MyBean.java[]
347347
----
348348

349349
In the presence of `spring-data-elasticsearch` and the required dependencies for using a `WebClient` (typically `spring-boot-starter-webflux`), Spring Boot can also auto-configure a <<features#data.nosql.elasticsearch.connecting-using-rest.webclient,ReactiveElasticsearchClient>> and a `ReactiveElasticsearchTemplate` as beans.
@@ -436,7 +436,7 @@ The following code listing shows how to inject a Cassandra bean:
436436

437437
[source,java,indent=0,subs="verbatim"]
438438
----
439-
include::{docs-java}/features/nosql/cassandra/connecting/MyBean.java[]
439+
include::{docs-java}/data/nosql/cassandra/connecting/MyBean.java[]
440440
----
441441

442442
If you add your own `@Bean` of type `CassandraTemplate`, it replaces the default.
@@ -515,7 +515,7 @@ The following examples shows how to inject a `CouchbaseTemplate` bean:
515515

516516
[source,java,indent=0,subs="verbatim"]
517517
----
518-
include::{docs-java}/features/nosql/couchbase/repositories/MyBean.java[]
518+
include::{docs-java}/data/nosql/couchbase/repositories/MyBean.java[]
519519
----
520520

521521
There are a few beans that you can define in your own configuration to override those provided by the auto-configuration:
@@ -529,7 +529,7 @@ For instance, you can customize the converters to use, as follows:
529529

530530
[source,java,indent=0,subs="verbatim"]
531531
----
532-
include::{docs-java}/features/nosql/couchbase/repositories/MyCouchbaseConfiguration.java[]
532+
include::{docs-java}/data/nosql/couchbase/repositories/MyCouchbaseConfiguration.java[]
533533
----
534534

535535

@@ -576,7 +576,7 @@ You can also inject an auto-configured `LdapTemplate` instance as you would with
576576

577577
[source,java,indent=0,subs="verbatim"]
578578
----
579-
include::{docs-java}/features/nosql/ldap/repositories/MyBean.java[]
579+
include::{docs-java}/data/nosql/ldap/repositories/MyBean.java[]
580580
----
581581

582582

spring-boot-project/spring-boot-docs/src/docs/asciidoc/data/sql.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Spring's `JdbcTemplate` and `NamedParameterJdbcTemplate` classes are auto-config
160160

161161
[source,java,indent=0,subs="verbatim"]
162162
----
163-
include::{docs-java}/features/sql/jdbctemplate/MyBean.java[]
163+
include::{docs-java}/data/sql/jdbctemplate/MyBean.java[]
164164
----
165165

166166
You can customize some properties of the template by using the `spring.jdbc.template.*` properties, as shown in the following example:
@@ -204,7 +204,7 @@ A typical entity class resembles the following example:
204204

205205
[source,java,indent=0,subs="verbatim"]
206206
----
207-
include::{docs-java}/features/sql/jpaandspringdata/entityclasses/City.java[]
207+
include::{docs-java}/data/sql/jpaandspringdata/entityclasses/City.java[]
208208
----
209209

210210
TIP: You can customize entity scanning locations by using the `@EntityScan` annotation.
@@ -227,7 +227,7 @@ The following example shows a typical Spring Data repository interface definitio
227227

228228
[source,java,indent=0,subs="verbatim"]
229229
----
230-
include::{docs-java}/features/sql/jpaandspringdata/repositories/CityRepository.java[]
230+
include::{docs-java}/data/sql/jpaandspringdata/repositories/CityRepository.java[]
231231
----
232232

233233
Spring Data JPA repositories support three different modes of bootstrapping: default, deferred, and lazy.
@@ -255,7 +255,7 @@ To use Spring Data Envers, make sure your repository extends from `RevisionRepos
255255

256256
[source,java,indent=0,subs="verbatim"]
257257
----
258-
include::{docs-java}/features/sql/jpaandspringdata/repositories/CountryRepository.java[]
258+
include::{docs-java}/data/sql/jpaandspringdata/repositories/CountryRepository.java[]
259259
----
260260

261261
NOTE: For more details, check the {spring-data-envers-doc}[Spring Data Envers reference documentation].
@@ -389,7 +389,7 @@ To use the `DSLContext`, you can inject it, as shown in the following example:
389389

390390
[source,java,indent=0,subs="verbatim"]
391391
----
392-
include::{docs-java}/features/sql/jooq/dslcontext/MyBean.java[tag=!method]
392+
include::{docs-java}/data/sql/jooq/dslcontext/MyBean.java[tag=!method]
393393
----
394394

395395
TIP: The jOOQ manual tends to use a variable named `create` to hold the `DSLContext`.
@@ -398,7 +398,7 @@ You can then use the `DSLContext` to construct your queries, as shown in the fol
398398

399399
[source,java,indent=0,subs="verbatim"]
400400
----
401-
include::{docs-java}/features/sql/jooq/dslcontext/MyBean.java[tag=method]
401+
include::{docs-java}/data/sql/jooq/dslcontext/MyBean.java[tag=method]
402402
----
403403

404404

@@ -451,14 +451,14 @@ The following example shows how to manually override the database port while the
451451

452452
[source,java,indent=0,subs="verbatim"]
453453
----
454-
include::{docs-java}/features/sql/r2dbc/MyR2dbcConfiguration.java[]
454+
include::{docs-java}/data/sql/r2dbc/MyR2dbcConfiguration.java[]
455455
----
456456

457457
The following examples show how to set some PostgreSQL connection options:
458458

459459
[source,java,indent=0,subs="verbatim"]
460460
----
461-
include::{docs-java}/features/sql/r2dbc/MyPostgresR2dbcConfiguration.java[]
461+
include::{docs-java}/data/sql/r2dbc/MyPostgresR2dbcConfiguration.java[]
462462
----
463463

464464
When a `ConnectionFactory` bean is available, the regular JDBC `DataSource` auto-configuration backs off.
@@ -495,7 +495,7 @@ A `DatabaseClient` bean is auto-configured, and you can `@Autowire` it directly
495495

496496
[source,java,indent=0,subs="verbatim"]
497497
----
498-
include::{docs-java}/features/sql/r2dbc/usingdatabaseclient/MyBean.java[]
498+
include::{docs-java}/data/sql/r2dbc/usingdatabaseclient/MyBean.java[]
499499
----
500500

501501

@@ -515,7 +515,7 @@ The following example shows a typical Spring Data repository interface definitio
515515

516516
[source,java,indent=0,subs="verbatim"]
517517
----
518-
include::{docs-java}/features/sql/r2dbc/repositories/CityRepository.java[]
518+
include::{docs-java}/data/sql/r2dbc/repositories/CityRepository.java[]
519519
----
520520

521521
TIP: We have barely scratched the surface of Spring Data R2DBC. For complete details, see the {spring-data-r2dbc-docs}[Spring Data R2DBC reference documentation].

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/caching.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ In a nutshell, to add caching to an operation of your service add the relevant a
1111

1212
[source,java,indent=0,subs="verbatim"]
1313
----
14-
include::{docs-java}/features/caching/MyMathService.java[]
14+
include::{docs-java}/io/caching/MyMathService.java[]
1515
----
1616

1717
This example demonstrates the use of caching on a potentially costly operation.
@@ -61,7 +61,7 @@ The following example sets a flag to say that `null` values should be passed dow
6161

6262
[source,java,indent=0,subs="verbatim"]
6363
----
64-
include::{docs-java}/features/caching/provider/MyCacheManagerConfiguration.java[]
64+
include::{docs-java}/io/caching/provider/MyCacheManagerConfiguration.java[]
6565
----
6666

6767
NOTE: In the preceding example, an auto-configured `ConcurrentMapCacheManager` is expected.
@@ -177,7 +177,7 @@ The following example shows a customizer that configures a specific entry expira
177177

178178
[source,java,indent=0,subs="verbatim"]
179179
----
180-
include::{docs-java}/features/caching/provider/couchbase/MyCouchbaseCacheManagerConfiguration.java[]
180+
include::{docs-java}/io/caching/provider/couchbase/MyCouchbaseCacheManagerConfiguration.java[]
181181
----
182182

183183

@@ -208,7 +208,7 @@ The following example shows a customizer that configures a specific time to live
208208

209209
[source,java,indent=0,subs="verbatim"]
210210
----
211-
include::{docs-java}/features/caching/provider/redis/MyRedisCacheManagerConfiguration.java[]
211+
include::{docs-java}/io/caching/provider/redis/MyRedisCacheManagerConfiguration.java[]
212212
----
213213

214214

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/jta.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You can inject into your bean without needing to use any `@Qualifier`:
4343

4444
[source,java,indent=0,subs="verbatim"]
4545
----
46-
include::{docs-java}/features/jta/mixingxaandnonxaconnections/primary/MyBean.java[tag=*]
46+
include::{docs-java}/io/jta/mixingxaandnonxaconnections/primary/MyBean.java[tag=*]
4747
----
4848

4949
In some situations, you might want to process certain JMS messages by using a non-XA `ConnectionFactory`.
@@ -53,14 +53,14 @@ If you want to use a non-XA `ConnectionFactory`, you can the `nonXaJmsConnection
5353

5454
[source,java,indent=0,subs="verbatim"]
5555
----
56-
include::{docs-java}/features/jta/mixingxaandnonxaconnections/nonxa/MyBean.java[tag=*]
56+
include::{docs-java}/io/jta/mixingxaandnonxaconnections/nonxa/MyBean.java[tag=*]
5757
----
5858

5959
For consistency, the `jmsConnectionFactory` bean is also provided by using the bean alias `xaJmsConnectionFactory`:
6060

6161
[source,java,indent=0,subs="verbatim"]
6262
----
63-
include::{docs-java}/features/jta/mixingxaandnonxaconnections/xa/MyBean.java[tag=*]
63+
include::{docs-java}/io/jta/mixingxaandnonxaconnections/xa/MyBean.java[tag=*]
6464
----
6565

6666

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/quartz.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ Regular beans can also be injected in a similar manner, as shown in the followin
5252

5353
[source,java,indent=0,subs="verbatim"]
5454
----
55-
include::{docs-java}/features/quartz/MySampleJob.java[]
55+
include::{docs-java}/io/quartz/MySampleJob.java[]
5656
----

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/rest-client.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The following code shows a typical example:
1313

1414
[source,java,indent=0,subs="verbatim"]
1515
----
16-
include::{docs-java}/features/resttemplate/MyService.java[]
16+
include::{docs-java}/io/restclient/resttemplate/MyService.java[]
1717
----
1818

1919
TIP: `RestTemplateBuilder` includes a number of useful methods that can be used to quickly configure a `RestTemplate`.
@@ -35,7 +35,7 @@ The following example shows a customizer that configures the use of a proxy for
3535

3636
[source,java,indent=0,subs="verbatim"]
3737
----
38-
include::{docs-java}/features/resttemplate/customization/MyRestTemplateCustomizer.java[]
38+
include::{docs-java}/io/restclient/resttemplate/customization/MyRestTemplateCustomizer.java[]
3939
----
4040

4141
Finally, you can also create your own `RestTemplateBuilder` bean.
@@ -44,7 +44,7 @@ The following example exposes a `RestTemplateBuilder` with what Spring Boot woul
4444

4545
[source,java,indent=0,subs="verbatim"]
4646
----
47-
include::{docs-java}/features/resttemplate/customization/MyRestTemplateBuilderConfiguration.java[]
47+
include::{docs-java}/io/restclient/resttemplate/customization/MyRestTemplateBuilderConfiguration.java[]
4848
----
4949

5050
The most extreme (and rarely used) option is to create your own `RestTemplateBuilder` bean without using a configurer.
@@ -65,7 +65,7 @@ The following code shows a typical example:
6565

6666
[source,java,indent=0,subs="verbatim"]
6767
----
68-
include::{docs-java}/features/webclient/MyService.java[]
68+
include::{docs-java}/io/restclient/webclient/MyService.java[]
6969
----
7070

7171

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/validation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For instance, the following service triggers the validation of the first argumen
88

99
[source,java,indent=0,subs="verbatim"]
1010
----
11-
include::{docs-java}/features/validation/MyBean.java[]
11+
include::{docs-java}/io/validation/MyBean.java[]
1212
----
1313

1414
The application's `MessageSource` is used when resolving +`{parameters}`+ in constraint messages.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/webservices.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ The following code shows a typical example:
2727

2828
[source,java,indent=0,subs="verbatim"]
2929
----
30-
include::{docs-java}/features/webservices/template/MyService.java[]
30+
include::{docs-java}/io/webservices/template/MyService.java[]
3131
----
3232

3333
By default, `WebServiceTemplateBuilder` detects a suitable HTTP-based `WebServiceMessageSender` using the available HTTP client libraries on the classpath.
3434
You can also customize read and connection timeouts as follows:
3535

3636
[source,java,indent=0,subs="verbatim"]
3737
----
38-
include::{docs-java}/features/webservices/template/MyWebServiceTemplateConfiguration.java[]
38+
include::{docs-java}/io/webservices/template/MyWebServiceTemplateConfiguration.java[]
3939
----

spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/amqp.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Spring's `AmqpTemplate` and `AmqpAdmin` are auto-configured, and you can autowir
5151

5252
[source,java,indent=0,subs="verbatim"]
5353
----
54-
include::{docs-java}/features/messaging/amqp/sending/MyBean.java[]
54+
include::{docs-java}/messaging/amqp/sending/MyBean.java[]
5555
----
5656

5757
NOTE: {spring-amqp-api}/rabbit/core/RabbitMessagingTemplate.html[`RabbitMessagingTemplate`] can be injected in a similar manner.
@@ -88,7 +88,7 @@ The following sample component creates a listener endpoint on the `someQueue` qu
8888

8989
[source,java,indent=0,subs="verbatim"]
9090
----
91-
include::{docs-java}/features/messaging/amqp/receiving/MyBean.java[]
91+
include::{docs-java}/messaging/amqp/receiving/MyBean.java[]
9292
----
9393

9494
TIP: See {spring-amqp-api}/rabbit/annotation/EnableRabbit.html[the Javadoc of `@EnableRabbit`] for more details.
@@ -102,14 +102,14 @@ For instance, the following configuration class exposes another factory that use
102102

103103
[source,java,indent=0,subs="verbatim"]
104104
----
105-
include::{docs-java}/features/messaging/amqp/receiving/custom/MyRabbitConfiguration.java[]
105+
include::{docs-java}/messaging/amqp/receiving/custom/MyRabbitConfiguration.java[]
106106
----
107107

108108
Then you can use the factory in any `@RabbitListener`-annotated method, as follows:
109109

110110
[source,java,indent=0,subs="verbatim"]
111111
----
112-
include::{docs-java}/features/messaging/amqp/receiving/custom/MyBean.java[]
112+
include::{docs-java}/messaging/amqp/receiving/custom/MyBean.java[]
113113
----
114114

115115
You can enable retries to handle situations where your listener throws an exception.

0 commit comments

Comments
 (0)