{"id":21280332,"url":"https://github.com/harryjhin/gemfire-springboot","last_synced_at":"2025-03-15T14:09:37.914Z","repository":{"id":214001466,"uuid":"490205052","full_name":"HarryJhin/gemfire-springboot","owner":"HarryJhin","description":"Apache Geode를 사용하여 데이터에 접근하는 Spring Boot 애플리케이션","archived":false,"fork":false,"pushed_at":"2022-05-09T08:53:24.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T04:11:31.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/HarryJhin.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}},"created_at":"2022-05-09T08:53:18.000Z","updated_at":"2022-05-09T08:53:28.000Z","dependencies_parsed_at":"2023-12-25T03:24:05.681Z","dependency_job_id":"d3fe1f5c-70f1-4f6e-ae41-c898e5848674","html_url":"https://github.com/HarryJhin/gemfire-springboot","commit_stats":null,"previous_names":["harryjhin/gemfire-springboot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryJhin%2Fgemfire-springboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryJhin%2Fgemfire-springboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryJhin%2Fgemfire-springboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HarryJhin%2Fgemfire-springboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HarryJhin","download_url":"https://codeload.github.com/HarryJhin/gemfire-springboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243738985,"owners_count":20340002,"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":[],"created_at":"2024-11-21T10:29:21.519Z","updated_at":"2025-03-15T14:09:37.883Z","avatar_url":"https://github.com/HarryJhin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accessing Data in Pivotal GemFire\n\n### 개요\n\nApache Geode용 Spring Data를 사용하여 POJO를 저장하고 검색합니다.\n\n\u003e **Apache Geode**는 `key/value` 저장소이며, 지역은 `java.util.concurrent.ConcurrentMap` 인터페이스를 구현합니다.\n\n\u003e **POJO(Plain Old Java Object)**는 순수한 자바 객체로 특정 기술에 종속적이지 않은 순수한 객체를 의미합니다.\n\n### 종속성\n\n- Spring for Apache Geode\n\n### 엔티티 정의\n\n몇 가지 어노테이션을 사용해 Apache Geode(지역)에 `Person` 객체를 저장합니다.\n\n`src/main/java/com/example/gemfile/Person.java`:\n\n```java\npackage hello;\n\nimport java.io.Serializable;\n\nimport org.springframework.data.annotation.Id;\nimport org.springframework.data.annotation.PersistenceConstructor;\nimport org.springframework.data.gemfire.mapping.annotation.Region;\n\nimport lombok.Getter;\n\n@Region(value = \"People\")\npublic class Person implements Serializable {\n\n  @Id\n  @Getter\n  private final String name;\n\n  @Getter\n  private final int age;\n\n  @PersistenceConstructor\n  public Person(String name, int age) {\n    this.name = name;\n    this.age = age;\n  }\n\n  @Override\n  public String toString() {\n    return String.format(\"%s is %d years old\", getName(), getAge());\n  }\n}\n```\n\n- `@Region(value = \"People\")`은  Apache Geode가 이 클래스의 인스턴스를 저장하면 People 지역 내에 새 항목이 생성됩니다.\n- `name` 필드를 `@Id`로 표시합니다. 이것은 Apache Geode 내에서 개인 데이터를 식별하고 추적하는 데 사용되는 식별자를 나타냅니다.\n\n기본적으로 `@Id` 어노테이션 필드(`name`)가 `key`이고, Person 인스턴스는 `value` 입니다. Apache Geode에는 자동화된 키 생성이 없으므로 Apache Geode에 엔티티를 유지하기 전에 ID(`name`)을 설정해야 합니다.\n\n### 리포지토리 정의\n\nSpring Data for Apache Geode는 Spring을 사용하여 Apache Geode에 데이터를 저장하고 액세스하는 데 중점을 둡니다. 기본적으로 Apache Geode(OQL)의 쿼리 언어를 배울 필요는 없습니다. 몇 가지 메서드를 작성할 수 있으며 프레임워크가 쿼리를 작성합니다.\n\n어떻게 작동하는지 보기 위해 Apache Geode에 저장된 Person 객체를 쿼리하는 인터페이스를 생성해야 합니다.\n\n`src/main/java/com/example/gemfile/PersonRepository.java`:\n\n```java\nimport org.springframework.data.gemfire.repository.query.annotation.Trace;\nimport org.springframework.data.repository.CrudRepository;\n\npublic interface PersonRepository extends CrudRepository\u003cPerson, String\u003e {\n\n  @Trace\n  Person findByName(String name);\n\n  @Trace\n  Iterable\u003cPerson\u003e findByAgeGreaterThan(int age);\n\n  @Trace\n  Iterable\u003cPerson\u003e findByAgeLessThan(int age);\n\n  @Trace\n  Iterable\u003cPerson\u003e findByAgeGreaterThanAndAgeLessThan(int greaterThanAge, int lessThanAge);\n\n}\n```\n\nPersonRepository는 Spring Data Commons에서 CrudRepository 인터페이스를 상속받고, value(Person 인스턴스)와 리포지토리가 작동하는 key(ID, 문자열)에 대한 제네릭 타입 매개변수의 타입을 지정합니다.\n\n이 인터페이스는 기본 CRUD(Create, Read, Update, Delete) 및 간단한 쿼리 데이터 액세스 작업(`findById()`)을 포함한 많은 작업과 함께 제공됩니다.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryjhin%2Fgemfire-springboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharryjhin%2Fgemfire-springboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryjhin%2Fgemfire-springboot/lists"}