{"id":21043677,"url":"https://github.com/streamlined2/rest-application","last_synced_at":"2025-12-28T15:59:29.590Z","repository":{"id":236817002,"uuid":"787875259","full_name":"streamlined2/REST-application","owner":"streamlined2","description":"Simple REST application","archived":false,"fork":false,"pushed_at":"2024-06-06T15:28:25.000Z","size":318,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T17:25:00.775Z","etag":null,"topics":["apache-poi","docker-compose","hibernate-orm","java-17","liquibase","maven","mockmvc","postgresql","rest","spring-boot","spring-data-jpa"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamlined2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T10:53:36.000Z","updated_at":"2024-06-06T15:28:29.000Z","dependencies_parsed_at":"2024-06-06T14:51:50.355Z","dependency_job_id":"1ba898f9-fcb8-412e-ac85-8fdddcc5b189","html_url":"https://github.com/streamlined2/REST-application","commit_stats":null,"previous_names":["streamlined2/rest-application"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2FREST-application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2FREST-application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2FREST-application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamlined2%2FREST-application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamlined2","download_url":"https://codeload.github.com/streamlined2/REST-application/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243489805,"owners_count":20298997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-poi","docker-compose","hibernate-orm","java-17","liquibase","maven","mockmvc","postgresql","rest","spring-boot","spring-data-jpa"],"created_at":"2024-11-19T14:13:44.140Z","updated_at":"2025-12-28T15:59:29.531Z","avatar_url":"https://github.com/streamlined2.png","language":"Java","readme":"\u003ch1\u003eЗапуск програми\u003c/h1\u003e\nМетод \u003ci\u003e\u003cb\u003emain\u003c/b\u003e\u003c/i\u003e основного класу застосунку \u003ci\u003e\u003cb\u003ecom.streamlined.restapp.RestApplication\u003c/b\u003e\u003c/i\u003e\n\u003cp\u003e\n\u003ch1\u003eІмпорт даних основної сутності\u003c/h1\u003e\nВихідний файл для імпорту даних основної сутності \u003ci\u003e\u003cb\u003ePerson\u003c/b\u003e\u003c/i\u003e розташований за посиланням\n\u003cp\u003e\u003ci\u003ehttps://github.com/streamlined2/REST-application/blob/main/src/main/resources/data/data0.json\u003c/i\u003e\n\u003cp\u003e\nФайл створений за допомогою метода \u003ci\u003e\u003cb\u003emain\u003c/b\u003e\u003c/i\u003e класа генератора випадкових даних \u003ci\u003e\u003cb\u003ecom.streamlined.restapp.generator.PersonDataGenerator\u003c/b\u003e\u003c/i\u003e із параметрами кількість файлів 1, кількість сутностей 1000.\n\u003cp\u003e\n\u003ch1\u003eСкріпти Liquibase\u003c/h1\u003e\nСкріпти Liquibase для створення таблиць, індексів сутностей \u003ci\u003e\u003cb\u003ePerson, Country\u003c/b\u003e\u003c/i\u003e і заповнення таблиці допоміжної сутності \u003ci\u003e\u003cb\u003eCountry\u003c/b\u003e\u003c/i\u003e розташовані в теці \u003ci\u003e\u003cb\u003esrc/main/resources/db\u003c/b\u003e\u003c/i\u003e\n\u003cp\u003e\n\u003ch1\u003eЗбереження даних\u003c/h1\u003e\nДля збереження і роботи із даними використовується імідж PostgreSQL 16.2\n\u003cp\u003e\n\t\t\u003ci\u003ehttps://hub.docker.com/r/bitnami/postgresql\u003c/i\u003e\n\u003cp\u003e\nСервіс запускається за допомогою Docker Compose, файл налаштування \u003ci\u003e\u003cb\u003ecompose.yaml\u003c/b\u003e\u003c/i\u003e розташований в корні проєкту.\n\u003cp\u003eДані контейнера відображаються в локальну теку \u003ci\u003eD:\\postgresql\u003c/i\u003e.\n\u003cp\u003e\n\u003ch1\u003eВиконання запитів для ендпойнтів \u003ci\u003e_list, _report\u003c/i\u003e основної сутності \u003ci\u003e\u003cb\u003ePerson\u003c/b\u003e\u003c/i\u003e\u003c/h1\u003e\n\u003ch2\u003eПриклад виконання запитів для ендпойнта \u003ci\u003e/api/person/_list\u003c/i\u003e\u003c/h2\u003e\n\u003cp\u003e\nЗапит для отримання першої сторінки розміром 10 сутностей зі значеннями статі \u003ci\u003eFEMALE\u003c/i\u003e, кольору очей \u003ci\u003eRED\u003c/i\u003e та волосся \u003ci\u003eYELLOW\u003c/i\u003e\n\u003cp\u003e\n\u003ci\u003e\n        {\n            \"sex\":\"FEMALE\",\n            \"eyeColor\":\"RED\",\n            \"hairColor\":\"YELLOW\",\n            \"page\":0,\n            \"size\":10\n        }\n\u003c/i\u003e\n\u003cp\u003e\nДля пошуку людини \u003ci\u003e\u003cb\u003ePerson\u003c/b\u003e\u003c/i\u003e по допоміжній сутності країни \u003ci\u003e\u003cb\u003eCountry\u003c/b\u003e\u003c/i\u003e можна зазначити одну із властивостей \u003ci\u003e\u003cb\u003eid\u003c/b\u003e\u003c/i\u003e, \u003ci\u003e\u003cb\u003ename\u003c/b\u003e\u003c/i\u003e, або \u003ci\u003e\u003cb\u003ecapital\u003c/b\u003e\u003c/i\u003e\n\u003cp\u003e\nНаприклад, для пошуку людини за іменем країни походження та за іменем столиці країни громадянства слід вказати запит\n\u003cp\u003e\n\u003ci\u003e\n        {\n            \"countryOfOrigin\":{\n                \"name\": \"USA\"\n            },\n            \"citizenship\":{\n                \"capital\": \"Washington\"\n            },\n            \"page\":0,\n            \"size\":10\n        }\n\u003c/i\u003e\n\u003cp\u003e\nДля пошуку за первинним ключем \u003ci\u003e\u003cb\u003eid\u003c/b\u003e\u003c/i\u003e країни походження можна вказати запит\n\u003cp\u003e\n\u003ci\u003e\n        {\n\t\t\t\"countryOfOrigin\":{\n\t\t\t\t\"id\":1\n\t\t\t},\n            \"page\":0,\n            \"size\":10\n        }\n\u003c/i\u003e\n\u003cp\u003e\nОскільки основна сутність \u003ci\u003e\u003cb\u003ePerson\u003c/b\u003e\u003c/i\u003e містить дві властивості допоміжної сутності \u003ci\u003e\u003cb\u003eCountry\u003c/b\u003e\u003c/i\u003e, а саме \u003ci\u003e\u003cb\u003ecountryOfOrigin\u003c/b\u003e\u003c/i\u003e та \u003ci\u003e\u003cb\u003ecitizenship\u003c/b\u003e\u003c/i\u003e, посилання на первинний ключ допоміжної сутності \u003ci\u003e\u003cb\u003ecountryId\u003c/b\u003e\u003c/i\u003e є двозначним і неможливим.\n\u003cp\u003e\nЗапити для ендпойнта \u003ci\u003e/api/person/_report\u003c/i\u003e ідентичні, але без використання параметрів \u003ci\u003e\u003cb\u003epage, size\u003c/b\u003e\u003c/i\u003e\n\u003cp\u003e\n\u003ch1\u003eВалідація даних\u003c/h1\u003e\nВалідація даних виконується компонентом \u003ci\u003eValidator\u003c/i\u003e на рівні сервісу перевіркою сутностей, а не DTO на рівні контролера, що спрощує супровід проєкту.\n\u003cp\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamlined2%2Frest-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamlined2%2Frest-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamlined2%2Frest-application/lists"}