Spring support for Apache Geode (spring-data-geode) - spring-data-gemfire

Could you please tell where to find out spring-data packages for Apache Geode? There is a spring-data-gemfire project that produces regular releases for Pivotal Gemfire. spring-data-geode is supposed to be a part of this project but I am not able to find out any information about. There is just one artifact with version 1.0.0.INCUBATING-RELEASE in Maven Central.
Thanks in advance,
Vadim

Excellent question!
There is a Spring Data Geode project, and you are correct, the latest version of Spring Data Geode is 1.0.0.INCUBATING-RELEASE (as seen in Maven Central). That particular version of SD Geode is based on Apache Geode 1.0.0-incubating, matching on version so users are clear which version of Apache Geode they get when declaring a dependency on SD Geode.
Being the Spring Data Geode project lead, I am acutely aware that Apache Geode released a 1.1.0 version at the end of February with a follow up 1.1.1 patch release in March (see Releases on the Apache Geode page).
Additionally, it has been sometime since I have cut a new release of Spring Data Geode to match the current version of Apache Geode (i.e. 1.1.1). There are several reasons for this...
First, I am in the process of enhancing Spring Data Geode's new Annotation-based configuration model (Spring Boot style) to allow for dynamic configuration of key Annotation attributes (think port numbers used between clients and servers for instance) when using the Annotations while still preserving the strongly-typed nature of the attributes (i.e. not all Strings). In a nutshell, I am accomplishing this with a standard convention often used in Spring, "Configurers", as well as "well-known and documented" properties rather than my previous intention (Property Placeholders and SpEL Expressions in Annotation attributes, which then would require them to be Strings, yuck).
NOTE: The beginnings of this new Annotation model in SD Geode and GemFire was described in 1 of my blogs. A subsequent follow-up blog entry specifically covered Annotation support for Geode's new Integrated Security Framework.
Second, I added support in SD Geode for Apache Geode's Lucene Integration.
Lastly, Spring Data Geode used to exist in the apache-geode branch in the Spring Data GemFire's GitHub Repository. However, since the last SD Geode release (i.e. 1.0.0.INCUBATING-RELEASE), #Oliver Gierke (Spring Data Team Lead) has agreed to make Spring Data Geode a top-level Spring Data project, like Spring Data GemFire, and so, Spring Data Geode will join the Spring Data Release Train, hopefully in the next Spring Data Kay Milestone 4 (M4) release. However, this depends entirely on the upcoming Apache Geode 1.2.0 release being released, first. As you can see, there is already a dedicated GitHub Repository specifically for the Spring Data Geode project now.
NOTE: While all my doc references here have been to Spring Data GemFire, they equally apply to Spring Data Geode, especially as of the Spring Data GemFire 2.0.0 Milestone releases (SD Kay) since SD GemFire is based on Pivotal GemFire 9.x, which is based on Apache Geode 1.0.0-incubating.
This means several things...
First, and most importantly, Spring Data Geode will have its own spring.io project page (under Spring Data) and its own documentation, separate from Spring Data GemFire, identifying it as separate/individual and proper Spring Data project.
Second, there are many things changing in Spring Data... alignment with Java 8, core Spring Framework 5 for Reactive/Functional architectures and significant changes in Spring Data itself. See the "core themes" in SD Kay for more details. As such, Spring Data Geode based on Apache Geode 1.2.0 will be at version 2.0.0 (unlike Apache Geode), therefore, the version numbers between Spring Data Geode and Apache Geode going forward will no longer align.
However, on positive note, once in place, Spring Data Geode will move at a predictable release cadence along with the rest of the Spring Data modules, including Spring Data GemFire. This means there will be a transition period to get all the bits in order though, and hence this seemingly gap in Spring support for the latest version of Apache Geode (i.e. 1.1.1).
Having said that, I am still planning to release 1 more individual Spring Data Geode release (i.e. 1.1.1.RELEASE) based Apache Geode 1.1.1, hopefully soon.
In the interim, you can use the Spring Data Geode 1.0.0.INCUBATING-RELEASE with the latest version of Apache Geode (i.e. 1.1.1) without incident by simply including the SD Geode 1.0.0.INCUBATING-RELEASE dependency and declaring a direct dependency on Apache Geode 1.1.1, which will override the version of Apache Geode pulled in by SD Geode, in your application POM file like so...
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-geode</artifactId>
<version>1.0.0.INCUBATING-RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.geode</groupId>
<artifactId>geode-core</artifactId>
<version>1.1.1</version>
</dependency>
<!-- along with any other geode dependencies you need -->
Anyway, hope this helps and I am sorry about the delay; juggling many priorities at the moment.
Cheers,
John

Related

Mapstruct Java Spring Compatibility

I am planning to use MapStruct in my project. Using JDK11, Spring boot 2.7.x has my current version but soon planning to upgrade it to JDK17 and Spring Boot 3.0. Based on documentation, latest library will support JDK8 onwards. Would like to know, whether library will support for above said specification. And also would like to know, how actively the project is going to support in near future?

Mybatis and Spring Boot 2.5

Will Mybatis support Spring Boot 2.5? Currently Mybatis Framework is shown as an unsupported Dependency on the Spring initializer Site for Spring Boot 2.5.0 M1 release.
Yes, it will once it reaches GA.
'M1' means it still is a milestone release.
See this answer for the details.
Even 2.5.0 GA can not choose Mybatis Framework In Initializr,
but I hear it is preparing now.
Besides, I can still use it by adding mybatis-spring-boot-starter to dependencies.

What is the difference between Spring Tool Suite 3 and 4?

I want to study Spring. In the case of STS (Spring Tool Suite) 3, there is "Spring legacy Project". 4 has a "Spring Starter Project", is it the same?
When I asked the Internet, people say "just use version 3".
What is the difference between version 3 and version 4?
Is "Spring Starter Project" and "Spring Legacy Project" the same thing?
1.What is the difference between version 3 and version 4?
Version 4.0 is the latest major release of the Spring Framework and the first to fully support Java 8 and few new features.[more]
Is "Spring Starter Project" and "Spring Legacy Project" the same thing?
Technically both are same spring project's. But they have some difference in configuration and build areas.
Spring Starter Project- Helps to create the spring boot project.(Spring Boot is basically an extension of the Spring framework which eliminated the boilerplate configurations required for setting up a Spring application.)
Spring Legacy Project - Helps to create the spring maven project. In which all the required configuration like servlet context,web,.. need to be configured manually either by using xml file or java classes.
Take a look at this page to know more about the difference between spring vs spring boot
If you are going to start learning spring from beginning, my suggestion is use Spring Starter Project because in Spring boot project setup is so simple, you can start coding with zero manual configuration.
For a more detailed introduction of the Spring Tools 4, please take a look at the blog post from the initial GA release of the Spring Tools 4:
https://spring.io/blog/2018/09/25/spring-tools-4-ga-released
There is no direct relation between the version numbers of the Spring Framework itself and the Spring Tools. In general, the Spring Tools 4 as well as the older Spring Tool Suite 3 support various Spring versions, ranging from Spring Framework 3 up to Spring Framework 5.2 and beyond.
I would strongly recommend to start with learning Spring by starting with Spring Boot, not the Spring Legacy projects. This is the way modern Spring applications are being built nowadays... :-)

Spring Boot, Spring-Kafka, and Spring-Cloud compatibility

My question is about Spring-Kafka and Spring Cloud compatibility.
I am using the following versions:
Kafka Broker 1.0.2
Spring Boot 1.5.2
Spring Kafka 1.2.2
Spring Cloud Stream Chelsea.SR2 (Spring Cloud Stream
Core 1.2.2.RELEASE)
The compatibility between Spring-Kafka and Spring Boot was asked in a different SO question a few days ago. The Spring-Kafka project page was updated with more details about the compatibility. The project site states the following:
All users with brokers >= 0.10.x.x (and all spring boot 1.5.x users) are recommended to use spring-kafka version 1.3.x
The compatibility matrix for Spring Cloud Stream and Spring-Kafka states that:
Spring Cloud Stream 1.2.x is compatible with Spring-Kafka 1.2.x, 1.1.x.
The Spring-Kafka project page recommends me to upgrade to 1.3.X, but my version of Spring Cloud Stream is no compatible with Spring-Kafka 1.3.X.
I would prefer to upgrade my Spring-Kafka version to 1.3.8. But I do not want to break Spring Cloud Stream.
Does anyone have experience with using a newer version of Spring-Kafka with an older version of Spring Cloud Stream?
Spring Boot 1.5.2 is extremely old (early 2017). The current Boot 1.5.x version is 1.5.18 (released today).
If you start a new Spring Boot 1.5 project using Initializr You get
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.18.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Edgware.SR5</spring-cloud.version>
<spring-kafka.version>1.3.8.RELEASE</spring-kafka.version>
</properties>
Edgware.SR5 pulls in the Ditmars Spring Cloud Stream release train (1.3.3) and, as you can see, spring-kafka 1.3.8 is used too.
So I would recommend you upgrade everything to get current.

Why maven does not support jpa 2.0?

As far as I know JPA 2.0 has been approved as final in December 2009.
But the central repository gives the pom file declaration for 1.0.2 and 3.0-public_review.
So how can I use the current version of JPA 2.x using maven?
JPA itself is just the API definition, you'll need a provider who has implemented the API. I tend to use hibernate but there are others such as EclipseLink or OpenJPA. If you stick to just the core JPA functionality then you'll be able to swap providers at a later date easily enough.
Your choice of provider may be influenced if you're using a particular EE application server. JPA is part of the EE spec now but each server uses a different provider. E.G. JBoss uses hibernate while glassfish uses EclipseLink I believe.
With that in mind this is how I declare my hibernate dependency in my pom.xml.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.8.Final</version>
</dependency>
This will automatically pull in the JPA 2.0 API jar along with other dependencies such as validation.