Rename packages for code samples to match sections
See gh-27132
This commit is contained in:
@@ -38,7 +38,7 @@ The following listing shows an example of such a bean:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/redis/connecting/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/redis/connecting/MyBean.java[]
|
||||
----
|
||||
|
||||
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:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/mongodb/connecting/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/mongodb/connecting/MyBean.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/mongodb/template/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/mongodb/template/MyBean.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/mongodb/repositories/CityRepository.java[]
|
||||
include::{docs-java}/data/nosql/mongodb/repositories/CityRepository.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/neo4j/connecting/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/neo4j/connecting/MyBean.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/neo4j/repositories/CityRepository.java[]
|
||||
include::{docs-java}/data/nosql/neo4j/repositories/CityRepository.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/neo4j/repositories/MyNeo4jConfiguration.java[]
|
||||
include::{docs-java}/data/nosql/neo4j/repositories/MyNeo4jConfiguration.java[]
|
||||
----
|
||||
====
|
||||
|
||||
@@ -251,7 +251,7 @@ The following example shows how to inject a Solr bean:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/solr/connecting/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/solr/connecting/MyBean.java[]
|
||||
----
|
||||
|
||||
If you add your own `@Bean` of type `SolrClient`, it replaces the default.
|
||||
@@ -343,7 +343,7 @@ as shown in the following example:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/elasticsearch/connectingusingspringdata/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/elasticsearch/connectingusingspringdata/MyBean.java[]
|
||||
----
|
||||
|
||||
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:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/cassandra/connecting/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/cassandra/connecting/MyBean.java[]
|
||||
----
|
||||
|
||||
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:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/couchbase/repositories/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/couchbase/repositories/MyBean.java[]
|
||||
----
|
||||
|
||||
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:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/couchbase/repositories/MyCouchbaseConfiguration.java[]
|
||||
include::{docs-java}/data/nosql/couchbase/repositories/MyCouchbaseConfiguration.java[]
|
||||
----
|
||||
|
||||
|
||||
@@ -576,7 +576,7 @@ You can also inject an auto-configured `LdapTemplate` instance as you would with
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/nosql/ldap/repositories/MyBean.java[]
|
||||
include::{docs-java}/data/nosql/ldap/repositories/MyBean.java[]
|
||||
----
|
||||
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ Spring's `JdbcTemplate` and `NamedParameterJdbcTemplate` classes are auto-config
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/jdbctemplate/MyBean.java[]
|
||||
include::{docs-java}/data/sql/jdbctemplate/MyBean.java[]
|
||||
----
|
||||
|
||||
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:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/jpaandspringdata/entityclasses/City.java[]
|
||||
include::{docs-java}/data/sql/jpaandspringdata/entityclasses/City.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/jpaandspringdata/repositories/CityRepository.java[]
|
||||
include::{docs-java}/data/sql/jpaandspringdata/repositories/CityRepository.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/jpaandspringdata/repositories/CountryRepository.java[]
|
||||
include::{docs-java}/data/sql/jpaandspringdata/repositories/CountryRepository.java[]
|
||||
----
|
||||
|
||||
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:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/jooq/dslcontext/MyBean.java[tag=!method]
|
||||
include::{docs-java}/data/sql/jooq/dslcontext/MyBean.java[tag=!method]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/jooq/dslcontext/MyBean.java[tag=method]
|
||||
include::{docs-java}/data/sql/jooq/dslcontext/MyBean.java[tag=method]
|
||||
----
|
||||
|
||||
|
||||
@@ -451,14 +451,14 @@ The following example shows how to manually override the database port while the
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/r2dbc/MyR2dbcConfiguration.java[]
|
||||
include::{docs-java}/data/sql/r2dbc/MyR2dbcConfiguration.java[]
|
||||
----
|
||||
|
||||
The following examples show how to set some PostgreSQL connection options:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/r2dbc/MyPostgresR2dbcConfiguration.java[]
|
||||
include::{docs-java}/data/sql/r2dbc/MyPostgresR2dbcConfiguration.java[]
|
||||
----
|
||||
|
||||
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
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/r2dbc/usingdatabaseclient/MyBean.java[]
|
||||
include::{docs-java}/data/sql/r2dbc/usingdatabaseclient/MyBean.java[]
|
||||
----
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@ The following example shows a typical Spring Data repository interface definitio
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/features/sql/r2dbc/repositories/CityRepository.java[]
|
||||
include::{docs-java}/data/sql/r2dbc/repositories/CityRepository.java[]
|
||||
----
|
||||
|
||||
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].
|
||||
|
||||
Reference in New Issue
Block a user