{"id":14972950,"url":"https://github.com/spring-projects/spring-boot-data-geode","last_synced_at":"2025-10-30T22:03:24.074Z","repository":{"id":43791214,"uuid":"90164817","full_name":"spring-projects/spring-boot-data-geode","owner":"spring-projects","description":"Spring Boot support for Apache Geode and VMware GemFire","archived":false,"fork":false,"pushed_at":"2023-11-01T00:06:27.000Z","size":42051,"stargazers_count":46,"open_issues_count":17,"forks_count":49,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-01-29T14:23:02.069Z","etag":null,"topics":["apache-geode","framework","java","spring","spring-boot"],"latest_commit_sha":null,"homepage":"https://projects.spring.io/spring-boot","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/spring-projects.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-03T15:31:10.000Z","updated_at":"2024-10-28T06:47:40.000Z","dependencies_parsed_at":"2023-01-23T05:30:57.786Z","dependency_job_id":"a2998cbb-82bf-4765-8d66-34020c2b0680","html_url":"https://github.com/spring-projects/spring-boot-data-geode","commit_stats":null,"previous_names":[],"tags_count":133,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-boot-data-geode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-boot-data-geode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-boot-data-geode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects%2Fspring-boot-data-geode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-projects","download_url":"https://codeload.github.com/spring-projects/spring-boot-data-geode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237116297,"owners_count":19258225,"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-geode","framework","java","spring","spring-boot"],"created_at":"2024-09-24T13:47:48.504Z","updated_at":"2025-10-19T11:30:16.784Z","avatar_url":"https://github.com/spring-projects.png","language":"Java","readme":":spring-docs: https://docs.spring.io/spring-framework/docs/current/reference/html/\n:sbdg-docs: https://docs.spring.io/spring-boot-data-geode-build/current/reference/html5/\n:sbdg-javadoc: https://docs.spring.io/spring-boot-data-geode-build/current/api/\n:sbdg-version: 2.0.0-M5\n:spring-boot-version: 3.0.0-M5\n:geode-javadoc: https://geode.apache.org/releases/latest/javadoc\n:geode-name: Apache Geode\n:gemfire-name: VMware Tanzu GemFire\n\nimage:https://jenkins.spring.io/buildStatus/icon?job=spring-boot-data-geode%2F2.0.x\u0026subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-boot-data-geode/]\n\n[[about]]\n== Spring Boot for {geode-name}\n\n_Spring Boot for {geode-name}_ (SBDG) extends https://projects.spring.io/spring-boot/[_Spring Boot_] to also include\n_auto-configuration_ and other _convention \u0026 configuration_ features to simplify the development of _Spring_ applications\nusing https://geode.apache.org/[{geode-name}].\n\nThis project builds on https://spring.io/projects/spring-boot[Spring Boot] along with\nhttps://spring.io/projects/spring-data-geode[_Spring Data for {geode-name}_] (SDG),\nhttps://spring.io/projects/spring-session-data-geode[_Spring Session for {geode-name}_] (SSDG)\nand https://github.com/spring-projects/spring-test-data-geode[_Spring Test for {geode-name}_] (STDG).\n\n[[notice]]\n== NOTICE\n\n[[notice-2023-january]]\n*2023-January-17*:\n\nAt the end of 2022, VMware https://tanzu.vmware.com/content/blog/spring-for-vmware-gemfire-is-now-available[announced]\nthe general availability of the Spring for VMware GemFire portfolio of projects.\n\nWhile these Spring based projects for VMware GemFire are open source and a succession to the Spring for Apache Geode\nprojects, they are not a replacement. VMware GemFire forked from the Apache Geode project and is not open source.\nAdditionally, newer Apache Geode and VMware GemFire clients are not backwards compatible with older Apache Geode\nand VMware GemFire servers. You can begin the transition by starting https://docs.vmware.com/en/Spring-Boot-for-VMware-GemFire/index.html[here].\n\nAlternatively, the Spring portfolio provides first-class https://docs.spring.io/spring-boot/docs/current/reference/html/io.html#io.caching.provider[integration]\nwith other comparable caching providers. Also, see https://docs.spring.io/spring-framework/docs/current/reference/html/integration.html#cache-store-configuration[here]\nand https://docs.spring.io/spring-framework/docs/current/reference/html/integration.html#cache-plug[here].\n\nFinally, keep in mind, the Spring for Apache Geode projects will still be maintained until OSS and commercial support\nends. Maintenance will only include CVE and critical fixes. No new features or major enhancements will be made.\nThe Spring Boot for Apache Geode support timelines can be viewed https://spring.io/projects/spring-boot#support[here].\nAlso see the https://github.com/spring-projects/spring-boot-data-geode/wiki/Spring-Boot-for-Apache-Geode-and-VMware-Tanzu-GemFire-Version-Compatibility-Matrix[Version Compatibility Matrix]\nfor up-to-date dependency and version details.\n\n[[notice-2022-october]]\n*2022-October-24*:\n\nSee the October 24th https://github.com/spring-projects/spring-data-geode#notice[NOTICE]\non the _Spring Data for Apache Geode_ GitHub project page for complete details.\n\n[[project-features]]\n=== Project Features\n\nSBDG adds dedicated _Spring Boot_ **auto-configuration** and *actuator* support for https://geode.apache.org/[{geode-name}]\nand integrates with other _Spring_ projects in addition to 3rd-party Java libraries.\n\nAmong other things, this project builds on https://projects.spring.io/spring-boot/[_Spring Boot_]\nand https://projects.spring.io/spring-data-geode/[_Spring Data for {geode-name}_] (SDG) to offer:\n\n1. _Auto-configures_ an _{geode-name}_ {geode-javadoc}/org/apache/geode/cache/client/ClientCache.html[ClientCache]\ninstance automatically when _Spring Data for {geode-name}_ (SDG) is on the application's CLASSPATH.\n\n2. _Auto-configures_ _{geode-name}_ as a _caching provider_ in {spring-docs}integration.html#cache[_Spring's Cache Abstraction_]\nwhen _Spring Data for {geode-name}_ (SDG) is on the application's CLASSPATH to solve caching uses cases.\n\n3. _Auto-configures_ _Spring Data for {geode-name}_ (SDG) {sbdg-docs}#geode-repositories[Repositories]\nwhen _Spring Data for {geode-name}_ (SDG) is on the application's CLASSPATH and _Spring Boot_ detects\nSDG _Repositories_ in your _Spring Boot_ application to solve persistent use cases.\n\n4. _Auto-configures_ _{geode-name}_ {sbdg-docs}#geode-functions[Functions] when _Spring Data for {geode-name}_ (SDG)\nis on the application's CLASSPATH and _Spring Boot_ auto-detects SDG Function implementations or executions to solve\ndistributed compute problems.\n\n5. _Auto-configures_ _{geode-name}_ {sbdg-docs}#geode-continuous-query[CQ] when _Spring Data for {geode-name}_ (SDG)\nis on the application's CLASSPATH and _Spring Boot_ auto-detects SDG CQ query declarations on application components\nto solve (near) realtime event stream processing use cases.\n\n6. _Auto-configures_ {geode-name} as a {sbdg-docs}#geode-session[HTTP Session state management provider]\nwhen _Spring Session for {geode-name}_ (SSDG) is on the application's CLASSPATH.\n\n7. _Auto-configures_ _{geode-name}_ {sbdg-docs}#geode-security[Security]\nincluding {sbdg-docs}#geode-security-auth[Authentication \u0026 Authorization (Auth)]\nas well as {sbdg-docs}#geode-security-ssl[Transport Layer Security (TLS) using SSL].\n\n8. Provides additional support for _Spring Boot_ and _Spring Data for {geode-name}_ applications deployed to\n{sbdg-docs}#cloudfoundry[VMware Tanzu Application Service (TAS)] using {gemfire-name} for VMs.\n\n9. Provides first-class support for Unit \u0026 Integration Testing in your _Spring Boot_ applications using {geode-name}\nwith _Spring Test for {geode-name}_ (STDG).\n\nThis, along with many other benefits, are provided by this project.\n\n[[learn]]\n=== Learn\n\nThe following SBDG versions are currently maintained and developed.\n\n.Supported Versions\n|===\n| Version | Reference Documentation | Javadoc | Samples\n\n| `current` | {sbdg-docs}[Ref Docs] | {sbdg-javadoc}[Javadoc] | {sbdg-docs}#geode-samples[Samples]\n| `2.0.0-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/2.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/2.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/2.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `2.0.0-M5`| https://docs.spring.io/spring-boot-data-geode-build/2.0.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/2.0.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/2.0.x/reference/html5/#geode-samples[Samples]\n| `1.7.6-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.7.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.7.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.7.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.7.5`| https://docs.spring.io/spring-boot-data-geode-build/1.7.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.7.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.7.x/reference/html5/#geode-samples[Samples]\n| `1.6.14-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.6.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.6.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.6.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.6.13`| https://docs.spring.io/spring-boot-data-geode-build/1.6.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.6.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.6.x/reference/html5/#geode-samples[Samples]\n\n|===\n\nThe following SBDG versions have reached their End-of-Life (EOL).\n\n.Unsupported (EOL) Versions\n|===\n| Version | Reference Documentation | Javadoc | Samples\n\n| `1.5.15-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.5.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.5.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.5.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.5.14`| https://docs.spring.io/spring-boot-data-geode-build/1.5.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.5.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.5.x/reference/html5/#geode-samples[Samples]\n| `1.4.14-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.4.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.4.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.4.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.4.13` | https://docs.spring.io/spring-boot-data-geode-build/1.4.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.4.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.4.x/reference/html5/#geode-samples[Samples]\n| `1.3.13.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.3.12.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.3.x/reference/html5/#geode-samples[Samples]\n| `1.2.14.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.2.13.RELEASE`| https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.2.x/reference/html5/#geode-samples[Samples]\n| `1.1.12.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.1.11.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.1.x/reference/html5/#geode-samples[Samples]\n| `1.0.2.BUILD-SNAPSHOT`| https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x-SNAPSHOT/reference/html5/#geode-samples[Samples]\n| `1.0.1.RELEASE` | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/[Ref Docs] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/api/[Javadoc] | https://docs.spring.io/spring-boot-data-geode-build/1.0.x/reference/html5/#geode-samples[Samples]\n\n|===\n\nSee _Spring Boot's_ https://github.com/spring-projects/spring-boot/wiki/Supported-Versions#releases[Releases]\nin the https://github.com/spring-projects/spring-boot/wiki/Supported-Versions[Support Versions] Wiki page\nfor more details.\n\n[[get-started]]\n=== Get Started!\n\nTo start using SBDG immediately, simply add the following dependency to your _Spring Boot_ application Maven POM\nor Gradle build file:\n\n.SBDG Maven POM dependency\n[subs=\"verbatim,attributes\"]\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.geode\u003c/groupId\u003e\n    \u003cartifactId\u003espring-geode-starter\u003c/artifactId\u003e\n    \u003cversion\u003e{sbdg-version}\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n.SBDG Gradle build dependency\n[subs=\"verbatim,attributes\"]\n[source,groovy]\n----\ndependencies {\n    compile \"org.springframework.geode:spring-geode-starter:{sbdg-version}\"\n}\n----\n\nIf you are using a SNAPSHOT or MILESTONE version of SBDG, perhaps to pick up a bug fix, improvement or new feature,\nbe sure to declare the appropriate Spring Repository.  For example, the when using a MILESTONE (e.g. M1), declare the\nSpring Milestone Repository.\n\n.Spring Milestone Repository declared in Maven POM\n[source,xml]\n----\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cname\u003espring-milestone\u003c/name\u003e\n        \u003curl\u003ehttps://repo.spring.io/milestone\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n----\n\n.Spring Milestone Repository declare in `build.gradle`\n[source,groovy]\n----\nrepositories {\n    maven { url \"https://repo.spring.io/milestone\" }\n}\n----\n\nNOTE: To use a SNAPSHOT, simply change the URL from `https://repo.spring.io/milestone`\nto `https://repo.spring.io/snapshot`.\n\nNOTE: Spring SNAPSHOT and MILESTONE artifacts are not published to Maven Central. Only GA release bits are published to\nMaven Central. When using GA bits, you do not need to declare a Repository for Maven Central when using Maven. You do\nneed to declare `mavenCentral()` when using Gradle.\n\n[[get-started-spring-initializer]]\n==== Getting Started with Spring Initializer\n\nTo make the task of creating a project even easier, the Spring Team recommends that you start at\nhttps://start.spring.io[start.spring.io].\n\nUse this https://start.spring.io/#!platformVersion={spring-boot-version}\u0026dependencies=geode[link] to create\na _Spring Boot_ project using {geode-name}.\n\nIn addition to declaring the SBDG dependency, `org.springframework.geode:spring-geode-starter`, the Maven POM or Gradle\nbuild file generated with _Spring Initializer_ at _start.spring.io_ includes the SBDG BOM, conveniently declared in a\ndependency management block in both Maven and Gradle projects. This is convenient when you anticipate that you will need\nto use more than 1 SBDG module.\n\nFor example, if you will also be using the `org.springframework.geode:spring-geode-starter-session` module for your\n(HTTP) Session management needs, or perhaps the `org.springframework.geode:spring-geode-starter-test` module to write\nUnit \u0026 Integration Tests for your _Spring Boot_, {geode-name} applications, then you can simply add the dependency\nand let the BOM manage the version for you. This also makes it easier to switch versions without having to change\nall the dependencies; simply change the version of the BOM.\n\n[[get-started-application]]\n==== Simple Spring Boot, {geode-name} application\n\nIn this section, we build a really simple _Spring Boot_ application using {geode-name} showing you how to\nget started quickly, easily and reliably.\n\nFor our example, we will create and persist a `User` to {geode-name}, then lookup the `User` by name.\n\nWe start by defining our `User` application domain model class.\n\n.User class\n[source,java]\n----\n@Getter\n@ToString\n@EqualsAndHashCode\n@RequiredArgsConstructor\n@Region(\"Users\")\nclass User {\n\n\t@lombok.NonNull @Id\n\tprivate final String name;\n\n}\n----\n\nWe use https://projectlombok.org/[Project Lombok] to simplify the implementation of our `User` class. Otherwise, the\nonly requirement to store `Users` in {geode-name} is to declare the `User` to data store mapping. We do this by\nannotating the `User` class with the SDG `@Region` mapping annotation along with declaring the `User.name` property\nto be the ID of `User` instances.\n\nBy declaring the `@Region` mapping annotation we are stating that instances of `User` will be stored in an {geode-name}\ncache `Region` named \"`Users`\". The _Spring Data_ `@Id` annotation serves to declare the identifier for a `User` object\nstored in {geode-name}. This is not unlike JPA's `@javax.persistence.Table` and `@javax.persistence.Id` mapping\nannotations.\n\nNOTE: An {geode-name} `Region` is equivalent to a database table and the cache is equivalent to a database schema.\nA database schema is a namespace for a collection of tables whereas an {geode-name} cache is a namespace for a group of\n`Regions` that hold the data. Each data store has its own data structure to organize and manage data. An RDBMS uses\na tabular data structure. Graph databases use a graph. Well, {geode-name} uses a `Region`, which is simply a key/value\ndata structure, or a map. In fact, an {geode-name} `Region` implements `java.util.Map` (indirectly) and is essentially\na distributed, horizontally scalable, highly concurrent, low-latency (among other things) `Map` implementation.\n\nNext, let's define a _Spring Data_ `CrudRepository` to persist and access `Users` stored in {geode-name}.\n\n.UserRepository\n[source,java]\n----\ninterface UserRepository extends CrudRepository\u003cUser, String\u003e { }\n----\n\nFinally, let's create a _Spring Boot application_ to tie everything together.\n\n.Spring Boot, {geode-name} application\n[source,java]\n----\n@Slf4j\n@SpringBootApplication\n@EnableClusterAware\n@EnableEntityDefinedRegions(basePackageClasses = User.class)\npublic class UserApplication {\n\n\tpublic static void main(String[] args) {\n\t\tSpringApplication.run(UserApplication.class, args);\n\t}\n\n\t@Bean\n\t@SuppressWarnings(\"unused\")\n\tApplicationRunner runner(UserRepository userRepository) {\n\n\t\treturn args -\u003e {\n\n\t\t\tlong count = userRepository.count();\n\n\t\t\tassertThat(count).isZero();\n\n\t\t\tlog.info(\"Number of Users [{}]\", count);\n\n\t\t\tUser jonDoe = new User(\"jonDoe\");\n\n\t\t\tlog.info(\"Created User [{}]\", jonDoe);\n\n\t\t\tuserRepository.save(jonDoe);\n\n\t\t\tlog.info(\"Saved User [{}]\", jonDoe);\n\n\t\t\tcount = userRepository.count();\n\n\t\t\tassertThat(count).isOne();\n\n\t\t\tlog.info(\"Number of Users [{}]\", count);\n\n\t\t\tUser jonDoeFoundById = userRepository.findById(jonDoe.getName()).orElse(null);\n\n\t\t\tassertThat(jonDoeFoundById).isEqualTo(jonDoe);\n\n\t\t\tlog.info(\"Found User by ID (name) [{}]\", jonDoeFoundById);\n\t\t};\n\t}\n}\n\n@Getter\n@ToString\n@EqualsAndHashCode\n@RequiredArgsConstructor\n@Region(\"Users\")\nclass User {\n\n\t@lombok.NonNull @Id\n\tprivate final String name;\n\n}\n\ninterface UserRepository extends CrudRepository\u003cUser, String\u003e { }\n----\n\nThe `UserApplication` class is annotated with `@SpringBootApplication` making it a proper _Spring Boot_ application.\nWith SBDG on the classpath, this effectively makes our application an {geode-name} application as well. SBDG will\n_auto-configure_ an {geode-name} `ClientCache` instance by default when SBDG is on the application classpath.\n\nWith the SDG `@Region` mapping annotation, we declared that instances of `User` will be stored in the \"`Users`\" `Region`.\nHowever, we have not yet created a \"`Users`\" `Region`. This is where the `@EnableEntityDefinedRegions` annotation comes\nin handy. Like JPA/Hibernate's ability to create database tables from our `@Entity` declared classes, SDG's\n`@EnableEntityDefinedRegions` annotation scans the classpath for application entity classes (e.g. `User`)\nand detects any classes annotated with `@Region` in order to create the named `Region` required by the application\nto persist data. The `basePackageClasses` attribute is a type-safe way to limit the scope of the scan.\n\nWhile useful and convenient during development, `@EnableEntityDefinedRegions` was not made into an _auto-configuration_\nfeature by default since there are many ways to define and configure a `Region`, which varies from data type to data\ntype (e.g. transactional data vs. reference data), and varies greatly by use case and requirements.\n\nWe make use of 1 more powerful annotation, SBDG's `@EnableClusterAware`, which allows you to switch between local-only,\nembedded development to a client/server topology with no code or configuration changes.\n\nTIP: You can learn more about the `@EnableClusterAware` annotation in SBDG's reference documentation\n(see {sbdg-docs}#geode-configuration-declarative-annotations-productivity-enableclusteraware[here]\nand in the {sbdg-docs}guides/getting-started.html[_Getting Started_] Sample).\n\nOur Java `main` method uses _Spring Boot's_ `SpringApplication` class to bootstrap the the {geode-name} `ClientCache`\napplication.\n\nFinally, we declare an `ApplicationRunner` bean to persist a `User` and then lookup the stored `User` by ID (or \"name\").\nAlong the way, we log the operations to see the application in action.\n\n.Example application log output (formatted to fit this screen)\n[source,text]\n----\n...\n2021-01-26 20:46:34.842  INFO 33218 --- [main] example.app.user.UserApplication : Started UserApplication in 4.561 seconds (JVM running for 5.152)\n2021-01-26 20:46:34.996  INFO 33218 --- [main] example.app.user.UserApplication : Number of Users [0]\n2021-01-26 20:46:34.996  INFO 33218 --- [main] example.app.user.UserApplication : Created User [User(name=jonDoe)]\n2021-01-26 20:46:35.025  INFO 33218 --- [main] example.app.user.UserApplication : Saved User [User(name=jonDoe)]\n2021-01-26 20:46:35.027  INFO 33218 --- [main] example.app.user.UserApplication : Number of Users [1]\n2021-01-26 20:46:35.029  INFO 33218 --- [main] example.app.user.UserApplication : Found User by ID (name) [User(name=jonDoe)]\n...\n----\n\nThat's it! That's all!\n\nWe have just created a simple _Spring Boot_ application using {geode-name} to persist and access data.\n\n[[get-started-next]]\n===== Where To Next\n\nTo continue your journey of learning, see the {sbdg-docs}[Reference Documentation] and jump into the \u003c\u003cexamples\u003e\u003e below.\n\n[[examples]]\n=== Examples\n\nThe single, most relevant \"_source of truth_\" on how to get started quickly, easily and reliably, using Spring Boot\nfor {geode-name} (SBDG) to solve problems, is to start with the {sbdg-docs}#geode-samples[Samples]. There, you will\nfind different examples with documentation and code showing you how to use SBDG to effectively handle specific\napplication concerns, like Caching.\n\nAdditionally, there are examples that walk you through the evolution of SBDG to really showcase what SBDG affords you.\nThe examples start by building a simple Spring Boot application using {geode-name}'s API only. Then, the app is rebuilt\nusing Spring Data for {geode-name} (SDG) to show the simplifications that SDG brings to the table. Finally, the app is\nrebuilt once more using SBDG to demonstrate the full power of {geode-name} when combined with _Spring Boot_. The examples\ncan be found in the https://github.com/kohlmu-pivotal/PCCDemo[PCCDemo] GitHub repository. Each app can be deployed to\nPivotal CloudFoundry (PCF) and bound to a Pivotal Cloud Cache (PCC) service instance. By using SBDG, little to no code\nor configuration changes are required to run the app locally and then later deploy the same app to a managed environment\nlike PCF. It just works!\n\nThen, there is the https://github.com/jxblum/temperature-service/tree/using-spring-boot[Temperature Service] example app\nshowcasing an  _Internet of Things_ (IoT) and _Event Stream Processing_ (ESP) Use Case to manage Temperature Sensors\nand Monitors, powered by {geode-name} with the help of SBDG to make the application configuration and implementation\nas simple as can be.\n\n[[spring-boot-project-site]]\n== Spring Boot Project Site\n\nYou can find documentation, issue management, support, samples, and guides for using _Spring Boot_\nat https://projects.spring.io/spring-boot/\n\n[[code-of-conduct]]\n== Code of Conduct\n\nPlease see our https://github.com/spring-projects/.github/blob/master/CODE_OF_CONDUCT.md[code of conduct]\n\n[[report-security-vulnerability]]\n== Reporting Security Vulnerabilities\n\nPlease see our https://github.com/spring-projects/spring-boot-data-geode/security/policy[Security policy].\n\n[[license]]\n== License\n\n_Spring Boot_ and _Spring Boot for {geode-name}_ is Open Source Software released under\nthe https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-projects%2Fspring-boot-data-geode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-projects%2Fspring-boot-data-geode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-projects%2Fspring-boot-data-geode/lists"}