{"id":16891605,"url":"https://github.com/kasramp/spring-data-redis-example-kotlin","last_synced_at":"2025-03-22T08:31:15.343Z","repository":{"id":37579050,"uuid":"195465348","full_name":"kasramp/spring-data-redis-example-kotlin","owner":"kasramp","description":"Spring Data Redis with Kotlin","archived":false,"fork":false,"pushed_at":"2024-01-02T20:52:45.000Z","size":108,"stargazers_count":26,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-01T14:41:35.227Z","etag":null,"topics":["kotlin","kotlin-language","redis","spring","spring-boot","spring-data"],"latest_commit_sha":null,"homepage":"https://www.geekyhacker.com/getting-started-with-spring-data-redis-with-kotlin/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kasramp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"kasramp","custom":"https://paypal.me/Madadipouya"}},"created_at":"2019-07-05T20:43:21.000Z","updated_at":"2024-09-26T01:35:22.000Z","dependencies_parsed_at":"2024-10-28T12:57:20.116Z","dependency_job_id":"692d5bd6-fe55-45eb-9c85-a9c4b5cd7681","html_url":"https://github.com/kasramp/spring-data-redis-example-kotlin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasramp%2Fspring-data-redis-example-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasramp%2Fspring-data-redis-example-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasramp%2Fspring-data-redis-example-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasramp%2Fspring-data-redis-example-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasramp","download_url":"https://codeload.github.com/kasramp/spring-data-redis-example-kotlin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198386,"owners_count":20414443,"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":["kotlin","kotlin-language","redis","spring","spring-boot","spring-data"],"created_at":"2024-10-13T17:08:05.765Z","updated_at":"2025-03-22T08:31:13.285Z","avatar_url":"https://github.com/kasramp.png","language":"Kotlin","funding_links":["https://github.com/sponsors/kasramp","https://paypal.me/Madadipouya"],"categories":[],"sub_categories":[],"readme":"# Spring Data Redis Example with Kotlin\n\n## Introduction\n\nThis example shows how to use Spring Data with Redis to do CRUD operations. Additionally, it demonstrates using Redis as a message broker.\n\nThe code is implemented using Kotlin, but it's easy for Java developers to understand as well.\n\nFor more in-depth details, have a look at the tutorials at links below:\n\n- [Getting started with Spring Data Redis with Kotlin](https://www.geekyhacker.com/getting-started-with-spring-data-redis-with-kotlin/)\n- [Redis Pub/Sub with Spring Boot](https://www.geekyhacker.com/redis-pub-sub-with-spring-boot/)\n- [Server-Sent Events with Spring MVC SseEmitter](https://www.geekyhacker.com/server-sent-events-with-spring-mvc-sseemitter/)\n- [Distributed SSE with Spring SseEmitter and Redis Pub/Sub](https://www.geekyhacker.com/distributed-sse-with-spring-sseemitter-and-redis-pub-sub/)\n- [How to handle MethodArgumentNotValidException in Spring Boot](https://www.geekyhacker.com/how-to-handle-methodargumentnotvalidexception-in-spring-boot/)\n- [Spring Boot Redis integration test with Testcontainers in Kotlin](https://www.geekyhacker.com/spring-boot-redis-integration-test-with-testcontainers-in-kotlin/)\n- [Spring Boot Swagger documentation using OpenAPI](https://www.geekyhacker.com/spring-boot-swagger-documentation-using-openapi/)\n- [Build Docker images in Spring Boot 3](https://www.geekyhacker.com/build-docker-images-in-spring-boot-3/)\n\n## Endpoints\n\nTo demonstrate CRUD operations, I use `Movie`, `Actor` model and created some endpoints to do basic CRUD operations as follows:\n\n- Create Movie\n- Update Movie\n- Delete Movie\n- List Movies\n- Create Actor\n- Update Actor\n- Delete Actor\n- List Actors\n- Add an Actor to a Movie \n \n## How to run\n\nThe project needs Redis to run. There's a `docker-compose` file contains all necessary configuration to run Redis flawlessly.\n\nTo use it. Just run:\n\n```bash\n$ docker-compose -f docker-compose.yml up -d\n``` \n\nAfter that the Redis should be accessible via port `6379` on `localhost` \n\nThen you can run the application like below:\n\n```bash\n$ ./mvnw spring-boot:run -Dserver.port=8090\n```\n\nIf you have a Redis running in another port or host, simply override below environment variables:\n\n- `SPRING_REDIS_HOST`\n- `SPRING_REDIS_PORT`\n\nOr modify `application.properties` file.\n\nTo interact with the APIs, after running the project, just open [http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui/index.html). You should see Swagger to interact with.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasramp%2Fspring-data-redis-example-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasramp%2Fspring-data-redis-example-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasramp%2Fspring-data-redis-example-kotlin/lists"}