Browse Source

Fix indentation in code examples.

Fixes the indentation to 4 characters in all code examples in *.adoc files.

Original pull request #1948
pull/1954/head
Jens Schauder 1 year ago
parent
commit
e651a565a1
No known key found for this signature in database
GPG Key ID: 74F6C554AE971567
  1. 1
      src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc
  2. 14
      src/main/antora/modules/ROOT/pages/r2dbc/getting-started.adoc
  3. 2
      src/main/antora/modules/ROOT/pages/r2dbc/mapping.adoc

1
src/main/antora/modules/ROOT/pages/jdbc/transactions.adoc

@ -50,6 +50,7 @@ public class UserManagementImpl implements UserManagement {
user.addRole(role); user.addRole(role);
userRepository.save(user); userRepository.save(user);
} }
}
} }
---- ----

14
src/main/antora/modules/ROOT/pages/r2dbc/getting-started.adoc

@ -100,10 +100,11 @@ Next, you need to create a table structure in your database, as follows:
[source,sql] [source,sql]
---- ----
CREATE TABLE person CREATE TABLE person(
(id VARCHAR(255) PRIMARY KEY, id VARCHAR(255) PRIMARY KEY,
name VARCHAR(255), name VARCHAR(255),
age INT); age INT
);
---- ----
You also need a main application to run, as follows: You also need a main application to run, as follows:
@ -117,10 +118,11 @@ When you run the main program, the preceding examples produce output similar to
[source] [source]
---- ----
2018-11-28 10:47:03,893 DEBUG amework.core.r2dbc.DefaultDatabaseClient: 310 - Executing SQL statement [CREATE TABLE person 2018-11-28 10:47:03,893 DEBUG amework.core.r2dbc.DefaultDatabaseClient: 310 - Executing SQL statement [CREATE TABLE person(
(id VARCHAR(255) PRIMARY KEY, id VARCHAR(255) PRIMARY KEY,
name VARCHAR(255), name VARCHAR(255),
age INT)] age INT
)]
2018-11-28 10:47:04,074 DEBUG amework.core.r2dbc.DefaultDatabaseClient: 908 - Executing SQL statement [INSERT INTO person (id, name, age) VALUES($1, $2, $3)] 2018-11-28 10:47:04,074 DEBUG amework.core.r2dbc.DefaultDatabaseClient: 908 - Executing SQL statement [INSERT INTO person (id, name, age) VALUES($1, $2, $3)]
2018-11-28 10:47:04,092 DEBUG amework.core.r2dbc.DefaultDatabaseClient: 575 - Executing SQL statement [SELECT id, name, age FROM person] 2018-11-28 10:47:04,092 DEBUG amework.core.r2dbc.DefaultDatabaseClient: 575 - Executing SQL statement [SELECT id, name, age FROM person]
2018-11-28 10:47:04,436 INFO org.spring.r2dbc.example.R2dbcApp: 43 - Person [id='joe', name='Joe', age=34] 2018-11-28 10:47:04,436 INFO org.spring.r2dbc.example.R2dbcApp: 43 - Person [id='joe', name='Joe', age=34]

2
src/main/antora/modules/ROOT/pages/r2dbc/mapping.adoc

@ -199,7 +199,7 @@ The following example of a Spring Converter implementation converts from a `Row`
[source,java] [source,java]
---- ----
@ReadingConverter @ReadingConverter
public class PersonReadConverter implements Converter<Row, Person> { public class PersonReadConverter implements Converter<Row, Person> {
public Person convert(Row source) { public Person convert(Row source) {
Person p = new Person(source.get("id", String.class),source.get("name", String.class)); Person p = new Person(source.get("id", String.class),source.get("name", String.class));

Loading…
Cancel
Save