Lab 5: Lazy Loading
Simulate a large payload and slow system
@SpringBootApplication
public class Lab5Application {
public static void main(String[] args) {
SpringApplication.run(Lab5Application.class, args);
}
@Bean
public ApplicationRunner initializeUsers(UserService userService, GroupService groupService) {
return (args) -> {
EasyUser thomas = userService.createUser(
"Thomas",
"This is a password"
);
userService.createUser(
"Cassandra",
"Test1234"
);
groupService.createGroup("USER_GROUP");
groupService.createGroup("ADMIN_GROUP");
groupService.addUserToGroup("USER_GROUP", thomas.uuid);
Faker faker = new Faker();
for (int i = 0; i < 10000; i++) {
userService.createUser(
faker.internet().username(),
faker.internet().password()
);
}
};
}
}
Problem
Lazy Loading the user table

Rendering the UserMangement
Last updated