все, показала, теперь нужно прикрутить mvc, безопасность и пагинацию!!!

This commit is contained in:
Елена Бакальская 2024-04-29 17:44:20 +04:00
parent 2b3e8e4001
commit 5da550f2ea
6 changed files with 39185 additions and 19 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -35,28 +35,27 @@ public class BackendApplication implements CommandLineRunner {
@Override
public void run(String... args) throws Exception {
// if (args.length > 0 && Objects.equals("--populate", args[0])) {
if (args.length > 0 && Objects.equals("--populate", args[0])) {
// _logger.info("Create default categories values");
_logger.info("Create default categories values");
// final var categorie1 = categorieService.create(new CategorieEntity(1,
// "Драма", "placeholder"));
// final var categorie2 = categorieService.create(new CategorieEntity(2,
// "Комедия", "placeholder"));
// final var categorie3 = categorieService.create(new CategorieEntity(4,
// "Хоррор", "placeholder"));
final var categorie1 = categorieService.create(new CategorieEntity(1,
"Драма", "placeholder"));
final var categorie2 = categorieService.create(new CategorieEntity(2,
"Комедия", "placeholder"));
final var categorie3 = categorieService.create(new CategorieEntity(4,
"Хоррор", "placeholder"));
// _logger.info("Create default movies values");
_logger.info("Create default movies values");
// movieService.create(new MovieEntity(1, categorie3, "Астрал", "", "", ""));
// movieService.create(new MovieEntity(1, categorie1, "Хатико", "", "", ""));
// movieService.create(new MovieEntity(1, categorie2, "Бабушка легкого
// поведения", "", "", ""));
// movieService.create(new MovieEntity(1, categorie3, "Пиковая дама", "", "",
// ""));
// movieService.create(new MovieEntity(1, categorie3, "Баба-Яга", "", "", ""));
movieService.create(new MovieEntity(1, categorie3, "Астрал", "1", "1", "1"));
movieService.create(new MovieEntity(1, categorie1, "Хатико", "2", "2", "2"));
movieService.create(new MovieEntity(1, categorie2, "Бабушка легкого ", "3", "3", "3"));
movieService.create(new MovieEntity(1, categorie3, "Пиковая дама", "4", "4",
"4"));
movieService.create(new MovieEntity(1, categorie3, "Баба-Яга", "5", "5", "5"));
// }
}
}
}

View File

@ -15,7 +15,7 @@ public class UserEntity extends BaseEntity {
@Column(nullable = false, unique = true, length = 15)
private String username;
@Column(nullable = false, unique = true, length = 5)
@Column(nullable = false, length = 5)
private String password;
@Column(nullable = false)

View File

@ -47,7 +47,7 @@ public class UserServiceTests {
@Order(1)
void createTest() {
Assertions.assertEquals(firstUser, userService.get(1));
Assertions.assertEquals(firstUser, userService.get(firstUser.getId()));
Assertions.assertEquals(3, userService.getAll().size());
}

Binary file not shown.