{"id":67438,"date":"2017-07-11T10:00:57","date_gmt":"2017-07-11T07:00:57","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=67438"},"modified":"2017-07-10T12:15:05","modified_gmt":"2017-07-10T09:15:05","slug":"apache-ignite-spring-data","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html","title":{"rendered":"Apache Ignite with Spring Data"},"content":{"rendered":"<p><a href=\"http:\/\/projects.spring.io\/spring-data\/\" target=\"_blank\" rel=\"noopener\">Spring Data<\/a>\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores. It is on top of JPA, adding another layer of abstraction and defining a standard-based design to support persistence Layer in a Spring context.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/spring_data_overview_small.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-67446\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/spring_data_overview_small.jpg\" alt=\"\" width=\"367\" height=\"281\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/spring_data_overview_small.jpg 367w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/spring_data_overview_small-300x230.jpg 300w\" sizes=\"(max-width: 367px) 100vw, 367px\" \/><\/a><\/p>\n<p>Apache Ignite <a href=\"https:\/\/ignite.apache.org\/releases\/latest\/javadoc\/org\/apache\/ignite\/springdata\/repository\/IgniteRepository.html\" target=\"_blank\" rel=\"noopener\">IgniteRepository<\/a>\u00a0implements Spring Data CrudRepository interface and extends basic capabilities of the \u00a0<a href=\"https:\/\/docs.spring.io\/spring-data\/commons\/docs\/current\/api\/org\/springframework\/data\/repository\/CrudRepository.html\" target=\"_blank\" rel=\"noopener\">CrudRepository<\/a>, which in turns supports:<\/p>\n<ol>\n<li>Basic CRUD operations on a repository for a specific type.<\/li>\n<li>Access to the Apache Ignite SQL grid via Spring Data API.<\/li>\n<\/ol>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/springdata.png\"><img decoding=\"async\" class=\"aligncenter wp-image-67447 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/springdata-1024x425.png\" alt=\"\" width=\"620\" height=\"257\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/springdata-1024x425.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/springdata-300x125.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/springdata-768x319.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/springdata.png 1600w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>With Spring Data&#8217;s repositories, you only need to write an interface with finder methods to query the objects. All the CRUD method for manipulating the objects will be delivered automatically. As an example:<\/p>\n<pre class=\"brush:java\">@RepositoryConfig(cacheName = \"DogCache\")\r\npublic interface DogRepository extends IgniteRepository&lt;Dog, Long&gt; {\r\n    List&lt;Dog&gt; getDogByName(String name);\r\n    Dog getDogById (Long id);\r\n}<\/pre>\n<pre class=\"brush:java\"><\/pre>\n<p>In this article, we are going to cover the following topics:<\/p>\n<ul>\n<li>Create a Maven project from the scratch for using Spring Data with Apache Ignite Grid.<\/li>\n<li>Persisting a few entities into Ignite caches through Spring Data framework.<\/li>\n<\/ul>\n<p>Before we start, let&#8217;s cover the prerequisites of the project in your sandbox:<\/p>\n<ol>\n<li>Java JDK 1.8<\/li>\n<li><strong>Ignite version2.0<\/strong><\/li>\n<li>Apache Maven version &gt;3.0.3<\/li>\n<\/ol>\n<p><strong>Step 1<\/strong><\/p>\n<p>Let\u2019s set up the sandbox first. Create a Maven project or Clone the project from the GitHub repository.<\/p>\n<pre class=\"brush:java\">mvn archetype:create -DgroupId=com.blu.imdg -DartifactId=spring-data<\/pre>\n<h2><strong>Step 2<\/strong><\/h2>\n<p>Modify the pom.xml, add the following maven dependencies:<\/p>\n<pre class=\"brush:xml\">&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.ignite&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;ignite-core&lt;\/artifactId&gt;\r\n    &lt;version&gt;2.0.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.ignite&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;ignite-spring&lt;\/artifactId&gt;\r\n    &lt;version&gt;2.0.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.ignite&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;ignite-spring-data&lt;\/artifactId&gt;\r\n    &lt;version&gt;2.0.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;org.apache.ignite&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;ignite-indexing&lt;\/artifactId&gt;\r\n    &lt;version&gt;2.0.0&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n    &lt;groupId&gt;com.h2database&lt;\/groupId&gt;\r\n    &lt;artifactId&gt;h2&lt;\/artifactId&gt;\r\n    &lt;version&gt;1.4.195&lt;\/version&gt;\r\n&lt;\/dependency&gt;<\/pre>\n<p>Note that, maven h2 dependency is optional. If you are getting an error like &#8220;org.h2.result.RowFactory&#8221;, add the dependency explicitly.<\/p>\n<h3><strong>The Domain Model<\/strong><\/h3>\n<p>Our example domain model\u00a0consisted of two different entities: Breed and Dog.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/ogm-2.png\"><img decoding=\"async\" class=\"aligncenter wp-image-67448\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/ogm-2.png\" alt=\"\" width=\"620\" height=\"239\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/ogm-2.png 767w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/ogm-2-300x116.png 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>The association between Breed and Dog is\u00a0<em>ManyToOne<\/em>. One Dog can have only one breed.<\/p>\n<h2><strong>Step 3<\/strong><\/h2>\n<p>Now, let\u2019s map the domain model by creating the Java classes and annotating them with the required meta-information. Let\u2019s start with the Breed class.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">package com.blu.imdg.model;\r\n\r\nimport org.apache.ignite.cache.query.annotations.QuerySqlField;\r\n\r\nimport java.io.Serializable;\r\n\r\npublic class Breed implements Serializable {\r\n\r\n    @QuerySqlField(index = true)\r\n    private Long id;\r\n\r\n    @QuerySqlField(index = true)\r\n    private String name;\r\n\r\n    public Long getId() {\r\n\r\n        return id;\r\n    }\r\n\r\n    public void setId(Long id) {\r\n        this.id = id;\r\n    }\r\n\r\n    public String getName() {\r\n        return name;\r\n    }\r\n\r\n    public void setName(String name) {\r\n        this.name = name;\r\n    }\r\n\r\n    @Override\r\n    public String toString() {\r\n        return \"Breed{\" +\r\n                \"id='\" + id + '\\'' +\r\n                \", name='\" + name + '\\'' +\r\n                '}';\r\n    }\r\n}<\/pre>\n<p>Note that, @QuerySqlField annotation enables the\u00a0fields for SQL queries.<\/p>\n<p>Create another class named Dog and add the following contents to it.<\/p>\n<pre class=\"brush:java\">package com.blu.imdg.model;\r\n\r\nimport org.apache.ignite.cache.query.annotations.QuerySqlField;\r\n\r\nimport java.io.Serializable;\r\nimport java.sql.Date;\r\n\r\npublic class Dog implements Serializable {\r\n\r\n    @QuerySqlField(index = true)\r\n    private Long id;\r\n    @QuerySqlField(index = true)\r\n    private String name;\r\n    @QuerySqlField(index = true)\r\n    private Long breedid;\r\n    @QuerySqlField(index = true)\r\n    private Date birthdate;\r\n\r\n    public Long getId() {\r\n        return id;\r\n    }\r\n\r\n    public void setId(Long id) {\r\n        this.id = id;\r\n    }\r\n\r\n    public String getName() {\r\n        return name;\r\n    }\r\n\r\n    public void setName(String name) {\r\n        this.name = name;\r\n    }\r\n\r\n    public Long getBreedid() {\r\n        return breedid;\r\n    }\r\n\r\n    public void setBreedid(Long breedid) {\r\n        this.breedid = breedid;\r\n    }\r\n\r\n    public Date getBirthdate() {\r\n        return birthdate;\r\n    }\r\n\r\n    public void setBirthdate(Date birthdate) {\r\n        this.birthdate = birthdate;\r\n    }\r\n\r\n    @Override\r\n    public String toString() {\r\n        return \"Dog{\" +\r\n                \"id=\" + id +\r\n                \", name='\" + name + '\\'' +\r\n                \", breedid=\" + breedid +\r\n                \", birthdate=\" + birthdate +\r\n                '}';\r\n    }\r\n}<\/pre>\n<h2><strong>Step 4<\/strong><\/h2>\n<p>Now,\u00a0lets\u00a0create the Spring repository for all the\u00a0pojo&#8217;s\u00a0created before.<\/p>\n<pre class=\"brush:java\">package com.blu.imdg.repositories;\r\n\r\nimport com.blu.imdg.model.Dog;\r\nimport org.apache.ignite.springdata.repository.IgniteRepository;\r\nimport org.apache.ignite.springdata.repository.config.RepositoryConfig;\r\n\r\nimport java.util.List;\r\n\r\n@RepositoryConfig(cacheName = \"DogCache\")\r\npublic interface DogRepository extends IgniteRepository&lt;Dog, Long&gt; {\r\n    List&lt;Dog&gt; getDogByName(String name);\r\n    Dog getDogById (Long id);\r\n}<\/pre>\n<p>@RepositoryConfig annotation should be specified to map a repository to a distributed cache. Also, we have two finder methods getDogByName and getDogById for querying the cache.<\/p>\n<p>Lets&#8217; add a similar repository for the Breed domain as follows:<\/p>\n<pre class=\"brush:java\">package com.blu.imdg.repositories;\r\n\r\nimport com.blu.imdg.model.Breed;\r\nimport org.apache.ignite.springdata.repository.IgniteRepository;\r\nimport org.apache.ignite.springdata.repository.config.Query;\r\nimport org.apache.ignite.springdata.repository.config.RepositoryConfig;\r\nimport org.springframework.data.domain.Pageable;\r\n\r\nimport java.util.List;\r\n\r\n@RepositoryConfig(cacheName = \"BreedCache\")\r\npublic interface BreedRepository extends IgniteRepository&lt;Breed, Long&gt; {\r\n\r\n    List&lt;Breed&gt; getAllBreedsByName (String name);\r\n\r\n    @Query(\"SELECT id FROM Breed WHERE id = ?\")\r\n    List&lt;Long&gt; getById (long id, Pageable pageable);\r\n}<\/pre>\n<p>In the above BreedRepository interface, we also use @Query(queryString) annotation, which can be used if a concrete SQL query needs to be executed as a result of a method call.<\/p>\n<p><strong>Step 5<\/strong><\/p>\n<p>Let\u2019s create the cache configuration class. Create an Ignite cache configuration class and\u00a0mark the application configuration with @EnableIgniteRepositories annotation, as shown below:<\/p>\n<pre class=\"brush:java\">package com.blu.imdg.repositories;\r\n\r\nimport com.blu.imdg.model.Breed;\r\nimport com.blu.imdg.model.Dog;\r\nimport org.apache.ignite.Ignite;\r\nimport org.apache.ignite.Ignition;\r\nimport org.apache.ignite.configuration.CacheConfiguration;\r\nimport org.apache.ignite.configuration.IgniteConfiguration;\r\nimport org.apache.ignite.springdata.repository.config.EnableIgniteRepositories;\r\nimport org.springframework.context.annotation.Bean;\r\nimport org.springframework.context.annotation.Configuration;\r\n\r\n@Configuration\r\n@EnableIgniteRepositories\r\npublic class SpringAppConfig {\r\n    @Bean\r\n    public Ignite igniteInstance() {\r\n        IgniteConfiguration cfg = new IgniteConfiguration();\r\n        \/\/ Setting some custom name for the node.\r\n        cfg.setIgniteInstanceName(\"springDataNode\");\r\n        \/\/ Enabling peer-class loading feature.\r\n        cfg.setPeerClassLoadingEnabled(true);\r\n        \/\/ Defining and creating a new cache to be used by Ignite Spring Data\r\n        \/\/ repository.\r\n        CacheConfiguration ccfgDog = new CacheConfiguration(\"DogCache\");\r\n        CacheConfiguration ccfgBreed = new CacheConfiguration(\"BreedCache\");\r\n        \/\/ Setting SQL schema for the cache.\r\n        ccfgBreed.setIndexedTypes(Long.class, Breed.class);\r\n        ccfgDog.setIndexedTypes(Long.class, Dog.class);\r\n\r\n        cfg.setCacheConfiguration(new CacheConfiguration[]{ccfgDog, ccfgBreed});\r\n\r\n        return Ignition.start(cfg);\r\n    }\r\n}<\/pre>\n<p>Note that, we have used two separate CacheConfiguration for\u00a0Breed\u00a0and Dog cache. Also, set the SQL schema for the cache.<\/p>\n<h2><strong>Step 6<\/strong><\/h2>\n<p>Once all the configurations and the repositories are ready to be used, we only need to register the configuration in a Spring application context.<\/p>\n<pre class=\"brush:java\">package com.blu.imdg;\r\n\r\nimport com.blu.imdg.model.Breed;\r\nimport com.blu.imdg.model.Dog;\r\nimport com.blu.imdg.repositories.BreedRepository;\r\nimport com.blu.imdg.repositories.DogRepository;\r\nimport com.blu.imdg.repositories.SpringAppConfig;\r\nimport org.springframework.context.annotation.AnnotationConfigApplicationContext;\r\n\r\nimport java.sql.Date;\r\nimport java.util.List;\r\n\r\n\/**\r\n * Hello world!\r\n *\r\n *\/\r\npublic class App \r\n{\r\n    private static AnnotationConfigApplicationContext ctx;\r\n    private static BreedRepository breedRepository;\r\n    private static DogRepository dogRepository;\r\n\r\n    public static void main( String[] args )\r\n    {\r\n        System.out.println( \"Spring Data Example!\" );\r\n        ctx = new AnnotationConfigApplicationContext();\r\n        ctx.register(SpringAppConfig.class);\r\n        ctx.refresh();\r\n\r\n        breedRepository = ctx.getBean(BreedRepository.class);\r\n        dogRepository = ctx.getBean(DogRepository.class);\r\n\r\n        \/\/fill the repository with data and Save\r\n        Breed collie = new Breed();\r\n        collie.setId(1L);\r\n        collie.setName(\"collie\");\r\n        \/\/save Breed with name collie\r\n        breedRepository.save(1L, collie);\r\n\r\n        System.out.println(\"Add one breed in the repository!\");\r\n        \/\/ Query the breed\r\n        List&lt;Breed&gt; getAllBreeds = breedRepository.getAllBreedsByName(\"collie\");\r\n\r\n        for(Breed breed : getAllBreeds){\r\n            System.out.println(\"Breed:\" + breed);\r\n        }\r\n        \/\/Add some dogs\r\n        Dog dina = new Dog();\r\n        dina.setName(\"dina\");\r\n        dina.setId(1L);\r\n        dina.setBreedid(1L);\r\n        dina.setBirthdate(new Date(System.currentTimeMillis()));\r\n        \/\/Save Dina\r\n        dogRepository.save(2L,dina);\r\n        System.out.println(\"Dog dina save into the cache!\");\r\n        \/\/Query the Dog Dina\r\n        List&lt;Dog&gt; dogs = dogRepository.getDogByName(\"dina\");\r\n        for(Dog dog : dogs){\r\n            System.out.println(\"Dog:\"+ dog);\r\n        }\r\n\r\n    }\r\n}<\/pre>\n<p>The above code snippet is very straight forward. First, we create a Spring annotated context and register our repositories. Next, we get the reference to our BreedRepository and DogRepository to insert a few data. To query the data we use basic CRUD operations or methods that will be automatically turned into Apache Ignite SQL queries:<\/p>\n<pre class=\"brush:java\">List&lt;Dog&gt; dogs = dogRepository.getDogByName(\"dina\");\r\nfor(Dog dog : dogs){\r\n  System.out.println(\"Dog:\"+ dog);\r\n}<\/pre>\n<h2><strong>Step 7<\/strong><\/h2>\n<p>Let\u2019s build and run the application. Execute the following command.<\/p>\n<pre class=\"brush:java\">mvn clean install\r\nmvn exec:java -Dexec.mainClass=com.blu.imdg.App<\/pre>\n<p>You should find a lot of log messages into the console.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.34.04.png\"><img decoding=\"async\" class=\"aligncenter wp-image-67449\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.34.04.png\" alt=\"\" width=\"860\" height=\"562\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.34.04.png 1600w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.34.04-300x196.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.34.04-768x502.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.34.04-1024x669.png 1024w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p>The log messages confirm\u00a0that\u00a0two entries (dina and breed-collie) have been flushed into the Ignite cache and retrieved the dog \u00a0<em>Dina\u00a0<\/em>from the cache. Let\u2019s explore\u00a0the cache through Ignite Visor.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.35.15.png\"><img decoding=\"async\" class=\"aligncenter wp-image-67450\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.35.15.png\" alt=\"\" width=\"620\" height=\"258\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.35.15.png 918w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.35.15-300x125.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.35.15-768x320.png 768w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>Two different\u00a0caches\u00a0have been created for the entities: Breed and Dog. If we scan the cache entries of the Dog cache, we should find the following entity on it.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.36.18.png\"><img decoding=\"async\" class=\"aligncenter wp-image-67451 size-large\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.36.18-1024x111.png\" alt=\"\" width=\"620\" height=\"67\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.36.18-1024x111.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.36.18-300x32.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.36.18-768x83.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/07\/Screen-Shot-2017-07-08-at-20.36.18.png 1600w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>Entity Dina has been persisted into the cache with the key of the Breed collie.<\/p>\n<p>If you want to learn more about Apache Ignite (using JPA, Hibernate or MyBatis), please refer the book \u00a0<a href=\"https:\/\/leanpub.com\/ignite\">High Performance\u00a0in-memory computing with Apache Ignite<\/a>.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/frommyworkshop.blogspot.com\/2017\/07\/apache-ignite-with-spring-data.html\">Apache Ignite with Spring Data<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG partner<\/a> Shamim Bhuiyan at the <a href=\"http:\/\/frommyworkshop.blogspot.com\">My workspace<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores. It is on top of JPA, adding another layer of abstraction and defining a standard-based design to support persistence Layer in a Spring context. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &hellip;<\/p>\n","protected":false},"author":957,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[321],"class_list":["post-67438","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring-data"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Ignite with Spring Data - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Ignite with Spring Data - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-11T07:00:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Shamim Bhuiyan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shamim Bhuiyan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html\"},\"author\":{\"name\":\"Shamim Bhuiyan\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/1685ad0945e2c2c7780a265a4174924f\"},\"headline\":\"Apache Ignite with Spring Data\",\"datePublished\":\"2017-07-11T07:00:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html\"},\"wordCount\":676,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Spring Data\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html\",\"name\":\"Apache Ignite with Spring Data - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2017-07-11T07:00:57+00:00\",\"description\":\"Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/07\\\/apache-ignite-spring-data.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Apache Ignite with Spring Data\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/1685ad0945e2c2c7780a265a4174924f\",\"name\":\"Shamim Bhuiyan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e704523cfc3333531913a51d8f2709a5e158d3c03dc0e26fe3f5747970a87895?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e704523cfc3333531913a51d8f2709a5e158d3c03dc0e26fe3f5747970a87895?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e704523cfc3333531913a51d8f2709a5e158d3c03dc0e26fe3f5747970a87895?s=96&d=mm&r=g\",\"caption\":\"Shamim Bhuiyan\"},\"description\":\"Dr. Shamim Ahmed Bhuiyan is an IT Architect, SOA solution designer, speaker and Big data evangelist. Independent consultant on BigData and HighLoad systems. Actively participates in development and designing high performance software for IT, telecommunication and banking industry.\",\"sameAs\":[\"http:\\\/\\\/frommyworkshop.blogspot.ru\",\"https:\\\/\\\/ru.linkedin.com\\\/in\\\/shamimbhuiyan\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/shamim-bhuiyan\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Ignite with Spring Data - Java Code Geeks","description":"Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html","og_locale":"en_US","og_type":"article","og_title":"Apache Ignite with Spring Data - Java Code Geeks","og_description":"Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores.","og_url":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-07-11T07:00:57+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Shamim Bhuiyan","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Shamim Bhuiyan","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html"},"author":{"name":"Shamim Bhuiyan","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/1685ad0945e2c2c7780a265a4174924f"},"headline":"Apache Ignite with Spring Data","datePublished":"2017-07-11T07:00:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html"},"wordCount":676,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Spring Data"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html","url":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html","name":"Apache Ignite with Spring Data - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2017-07-11T07:00:57+00:00","description":"Spring Data\u00a0provides a unified and easy way to access the different kinds of persistence store, both relational database systems, and NoSQL data stores.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2017\/07\/apache-ignite-spring-data.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Apache Ignite with Spring Data"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/1685ad0945e2c2c7780a265a4174924f","name":"Shamim Bhuiyan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e704523cfc3333531913a51d8f2709a5e158d3c03dc0e26fe3f5747970a87895?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e704523cfc3333531913a51d8f2709a5e158d3c03dc0e26fe3f5747970a87895?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e704523cfc3333531913a51d8f2709a5e158d3c03dc0e26fe3f5747970a87895?s=96&d=mm&r=g","caption":"Shamim Bhuiyan"},"description":"Dr. Shamim Ahmed Bhuiyan is an IT Architect, SOA solution designer, speaker and Big data evangelist. Independent consultant on BigData and HighLoad systems. Actively participates in development and designing high performance software for IT, telecommunication and banking industry.","sameAs":["http:\/\/frommyworkshop.blogspot.ru","https:\/\/ru.linkedin.com\/in\/shamimbhuiyan"],"url":"https:\/\/www.javacodegeeks.com\/author\/shamim-bhuiyan"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/67438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/957"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=67438"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/67438\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=67438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=67438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=67438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}