@ -51,6 +51,7 @@ public class UserManagementImpl implements UserManagement {
@@ -51,6 +51,7 @@ public class UserManagementImpl implements UserManagement {
userRepository.save(user);
}
}
}
----
The preceding example causes calls to `addRoleToAllUsers(…)` to run inside a transaction (participating in an existing one or creating a new one if none are already running).
@ -100,10 +100,11 @@ Next, you need to create a table structure in your database, as follows:
@@ -100,10 +100,11 @@ Next, you need to create a table structure in your database, as follows:
[source,sql]
----
CREATE TABLE person
(id VARCHAR(255) PRIMARY KEY,
CREATE TABLE person(
id VARCHAR(255) PRIMARY KEY,
name VARCHAR(255),
age INT);
age INT
);
----
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
@@ -117,10 +118,11 @@ When you run the main program, the preceding examples produce output similar to