{"id":23024589,"url":"https://github.com/codejsha/spring-rest-sakila","last_synced_at":"2026-05-02T03:32:25.112Z","repository":{"id":134748546,"uuid":"525734466","full_name":"codejsha/spring-rest-sakila","owner":"codejsha","description":"Spring boot application that provides REST API to access the Sakila database.","archived":false,"fork":false,"pushed_at":"2023-09-18T07:46:54.000Z","size":1759,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T19:47:09.057Z","etag":null,"topics":["querydsl","sakila-database","spring-boot","spring-data-jpa","spring-hateoas","spring-rest-docs"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codejsha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-08-17T10:06:12.000Z","updated_at":"2025-02-21T10:33:44.000Z","dependencies_parsed_at":"2024-12-15T13:20:08.276Z","dependency_job_id":"da597012-f90c-4f98-8e73-472da02c062f","html_url":"https://github.com/codejsha/spring-rest-sakila","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codejsha/spring-rest-sakila","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejsha%2Fspring-rest-sakila","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejsha%2Fspring-rest-sakila/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejsha%2Fspring-rest-sakila/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejsha%2Fspring-rest-sakila/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codejsha","download_url":"https://codeload.github.com/codejsha/spring-rest-sakila/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codejsha%2Fspring-rest-sakila/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32522245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["querydsl","sakila-database","spring-boot","spring-data-jpa","spring-hateoas","spring-rest-docs"],"created_at":"2024-12-15T13:19:39.090Z","updated_at":"2026-05-02T03:32:25.081Z","avatar_url":"https://github.com/codejsha.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-rest-sakila\n\nSakila REST API Service (Sample Project)\n\n![Gradle Build](https://github.com/codejsha/spring-rest-sakila/actions/workflows/gradle.yml/badge.svg)\n\n[English](README.md) | [Korean](README_ko-KR.md)\n\nThis REST API service provides access to the [Sakila database](https://dev.mysql.com/doc/sakila/en/), which is a sample database provided by MySQL for learning and testing purposes. The Sakila database models a DVD rental store company, includes data about films, actors, customers, rentals, and more.\n\nThis service provides a simple way to perform CRUD(Create, Read, Update, Delete) operations on the Sakila database. It also provides endpoints to perform more complex queries.\n\nMicroservices version is go to: https://github.com/codejsha/sakila-microservices\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Getting Started](#getting-started)\n  - [Requirements](#requirements)\n  - [Libraries and Plugins](#libraries-and-plugins)\n  - [External MySQL database](#external-mysql-database)\n- [Installation](#installation)\n  - [Clone Repository](#clone-repository)\n  - [Configure Database Connection Settings](#configure-database-connection-settings)\n  - [Configure Application Settings](#configure-application-settings)\n  - [Build Project](#build-project)\n  - [Run Application](#run-application)\n- [API Documentation](#api-documentation)\n  - [Endpoints](#endpoints)\n  - [References](#references)\n  - [OpenAPI/Swagger](#openapiswagger)\n  - [Postman](#postman)\n- [Observability](#observability)\n- [Sample Data](#sample-data)\n\n## Getting Started\n\n### Requirements\n\n- Java 17\n- Gradle 7\n- MySQL 8\n\n### Libraries and Plugins\n\nFor a complete list, see the `gradle/libs.versions.toml` file.\n\n- Spring Boot Web\n- Spring Data JPA\n- Spring HATEOAS\n- Spring REST Docs\n- Lombok\n- Querydsl\n- MapStruct\n\n### External MySQL database\n\nAn external MySQL database is required to run the application. The external database can be run as a [MySQL docker](https://hub.docker.com/_/mysql) container or as on-premises process ([MySQL Community Downloads](https://dev.mysql.com/downloads/)). After installation, follow the [Sakila database](https://dev.mysql.com/doc/sakila/en/) official guide to create the database structure and populate the data. See the link for examples of configuring your environment: https://github.com/codejsha/infrastructure-examples/tree/main/mysql\n\n## Installation\n\n### Clone Repository\n\n```bash\n# GitHub CLI\ngh repo clone codejsha/spring-rest-sakila\n# Git CLI\ngit clone https://github.com/codejsha/spring-rest-sakila.git\n```\n\n### Configure Database Connection Settings\n\nBefore you can use the Sakila REST API Service, you need to configure the database connection settings. The database connection settings are defined in the `application.yaml` file. The default settings are as follows:\n\n```yaml\n# application.yaml\nspring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver\n    url: jdbc:mysql://localhost:3306/sakila\n    username: sakila\n    password: sakila\n```\n\n### Configure Application Settings\n\nThe default URL settings for the application API endpoint are as follows:\n\n```yaml\n# application.yaml\nserver:\n  port: 8080\n  servlet:\n    context-path: /api/v1\n...\n\napp:\n  uri:\n    scheme: http\n    host: localhost\n    port: ${server.port}\n```\n\n```kotlin\n// build.gradle.kts\nopenapi3 {\n    this.setServer(\"http://localhost:8080/api/v1\")\n    // ...\n}\n\npostman {\n    baseUrl = \"http://localhost:8080/api/v1\"\n    // ...\n}\n```\n\n### Build Project\n\n```bash\ncd spring-rest-sakila\nbash ./gradlew build\n```\n\n### Run Application\n\n```bash\nbash ./gradlew bootRun\n```\n\n## API Documentation\n\n### Endpoints\n\nThe Sakila REST API Service exposes the following some endpoints. Each endpoint supports CRUD operations.\n\n- Actors: `/api/v1/actors`\n- Customers: `/api/v1/customers`\n- Films: `/api/v1/films`\n- Payments: `/api/v1/payments`\n- Rentals: `/api/v1/rentals`\n- Reports: `/api/v1/reports`\n- Staffs: `/api/v1/staffs`\n- Stores: `/api/v1/stores`\n\n### References\n\nAPI references are generated by Asciidoctor in Spring REST Docs.\n\n### OpenAPI/Swagger\n\nThe OpenAPI specification file `openapi3.yaml` can be rendered using the Swagger UI. The specification is generated by Spring REST Docs.\n\n### Postman\n\nThe Postman collection file `postman-collection.json` contains the endpoints and examples of requests and responses. The collection is generated by Spring REST Docs.\n\n## Observability\n\nThe application provides observability features using Spring Boot Actuator and Micrometer.\n\n- Actuator: `/api/v1/actuator`\n- Prometheus: `/api/v1/actuator/prometheus`\n\n```yaml\n# application.yaml\nmanagement:\n  endpoints:\n    web:\n      exposure:\n        include: \"health,prometheus\"\n    jmx:\n      exposure:\n        exclude: \"*\"\n```\n\n## Sample Data\n\nThe sample data is from [MySQL Sakila sample database](https://dev.mysql.com/doc/sakila/en/). It is a relational database model for a DVD rental store which contains data related to films, actors, customers, rentals, and more. The database also serves views, stored procedures, and triggers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodejsha%2Fspring-rest-sakila","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodejsha%2Fspring-rest-sakila","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodejsha%2Fspring-rest-sakila/lists"}