Skip to content

Add AOT support for dynamic projections, streaming/scroll queries and Meta annotation #4970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
78998ff
Adding queryable encryption range support
rozza Jan 24, 2025
aec2398
Introduce Queryable annotation and add Schema derivation.
christophstrobl Feb 25, 2025
efbea03
Polishing.
mp911de Apr 9, 2025
486e2f4
Update Javadoc.
christophstrobl Apr 14, 2025
5dff182
Prepare next development iteration.
mp911de Nov 19, 2024
b5c7e14
After release cleanups.
mp911de Nov 19, 2024
625b260
Adopt to deprecation removals in Commons.
mp911de Nov 19, 2024
179c6db
Remove commons-logging exclusion.
mp911de Jan 8, 2025
3f78916
Prepare 5.0 M1 (2025.1.0).
christophstrobl Jan 24, 2025
bd9018e
Release version 5.0 M1 (2025.1.0).
christophstrobl Jan 24, 2025
846eed1
Prepare next development iteration.
christophstrobl Jan 24, 2025
7094642
After release cleanups.
christophstrobl Jan 24, 2025
daf6827
Remove JMX support.
mp911de Apr 9, 2025
5dbdaca
Remove MongoDB driver 4 compatibility.
christophstrobl Apr 14, 2025
87f6264
Migrate to JSpecify annotations for nullability constraints.
christophstrobl Mar 12, 2025
2489314
Fix `@MongoId` mapping for `insertAll`.
christophstrobl Apr 11, 2025
198a37b
Polishing.
mp911de Apr 14, 2025
4244a88
Polishing.
mp911de Apr 14, 2025
394c807
Add support for MongoDB AOT Repositories.
christophstrobl Jan 9, 2025
4ff3efe
Adopt to Commons changes.
mp911de Mar 28, 2025
b856247
Extend AOT Repository Support.
christophstrobl Apr 7, 2025
9501461
Fix nullable annotations.
christophstrobl Apr 15, 2025
d5a07d7
Remove package-info from empty directory.
christophstrobl Apr 16, 2025
3aad80f
Update mongo-encryption.adoc
jyemin Apr 14, 2025
06d60ca
Update mongo-search-indexes.adoc.
alexbevi Mar 28, 2025
938cdc1
Use `awaitility` version property.
mp911de Apr 17, 2025
a9f48ae
Add support for sorting simple arrays (integers/strings) with SortArr…
Apr 10, 2025
d9a098f
Add support for sorting simple arrays by direction.
nathanukey Apr 2, 2025
256bdd7
Polishing.
christophstrobl Apr 11, 2025
81acf1b
Clarify QueryDSL usage in reference documentation.
mp911de Apr 22, 2025
9cec00c
Prepare 5.0 M2 (2025.1.0).
mp911de Apr 22, 2025
a84a365
Release version 5.0 M2 (2025.1.0).
mp911de Apr 22, 2025
f672185
Prepare next development iteration.
mp911de Apr 22, 2025
1919dad
After release cleanups.
mp911de Apr 22, 2025
740a206
Adopt to AOT changes in Commons.
mp911de May 7, 2025
8f9daf8
Update issue reference in tests.
christophstrobl May 9, 2025
a4cc5bb
Add support for fluent QueryResultConverter.
mp911de Apr 17, 2025
d76017f
Polishing.
mp911de Apr 17, 2025
0297d95
Support QueryResultConverter for delete, replace and update operations.
christophstrobl Apr 29, 2025
94f3207
Polishing.
mp911de May 8, 2025
d9e4948
Support QueryResultConverter for reactive delete, replace and update …
christophstrobl May 9, 2025
39594ba
Add missing issue reference to tests.
christophstrobl May 9, 2025
9893203
Adopt to documentation feature-flags in Commons.
mp911de May 9, 2025
d76f016
Use `LocalVariableNameFactory` to avoid parameter name clashes.
mp911de May 8, 2025
e2d371a
Add support for returning SearchResult from repository query methods.
mp911de Apr 10, 2025
48911f0
Polishing.
christophstrobl May 6, 2025
cac8e0c
Update CI Properties.
mp911de May 12, 2025
0f9d56a
Update CI Properties.
mp911de May 12, 2025
2656b3f
Upgrade to MongoDB driver 5.5.0
christophstrobl May 7, 2025
0432a6e
Remove MongoDB 6.0 docker build.
mp911de May 12, 2025
71a652b
Polishing.
mp911de May 12, 2025
2a183c0
Implement `RepositoryFactorySupport.getEntityInformation(RepositoryMe…
mp911de May 13, 2025
0e5abfa
Polishing.
mp911de May 13, 2025
155e6d1
Add AOT support for dynamic projections, streaming/scroll queries and…
mp911de May 14, 2025
0feb099
Fix aggregation streams, count result conversion.
mp911de May 14, 2025
47bb36b
Add repository benchmarks.
mp911de May 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
54 changes: 7 additions & 47 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipeline {

triggers {
pollSCM 'H/10 * * * *'
upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
upstream(upstreamProjects: "spring-data-commons/4.0.x", threshold: hudson.model.Result.SUCCESS)
}

options {
Expand All @@ -20,29 +20,10 @@ pipeline {
stages {
stage("Docker images") {
parallel {
stage('Publish JDK (Java 17) + MongoDB 6.0') {
when {
anyOf {
changeset "ci/openjdk17-mongodb-6.0/**"
changeset "ci/pipeline.properties"
}
}
agent { label 'data' }
options { timeout(time: 30, unit: 'MINUTES') }

steps {
script {
def image = docker.build("springci/spring-data-with-mongodb-6.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.6.0.version']} ci/openjdk17-mongodb-6.0/")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
}
}
}
stage('Publish JDK (Java 17) + MongoDB 7.0') {
stage('Publish JDK (Java 24) + MongoDB 8.0') {
when {
anyOf {
changeset "ci/openjdk17-mongodb-7.0/**"
changeset "ci/openjdk24-mongodb-8.0/**"
changeset "ci/pipeline.properties"
}
}
Expand All @@ -51,7 +32,7 @@ pipeline {

steps {
script {
def image = docker.build("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.7.0.version']} ci/openjdk17-mongodb-7.0/")
def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.7.0.version']} ci/openjdk24-mongodb-8.0/")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
Expand All @@ -61,7 +42,7 @@ pipeline {
stage('Publish JDK (Java.next) + MongoDB 8.0') {
when {
anyOf {
changeset "ci/openjdk17-mongodb-8.0/**"
changeset "ci/openjdk24-mongodb-8.0/**"
changeset "ci/pipeline.properties"
}
}
Expand All @@ -70,7 +51,7 @@ pipeline {

steps {
script {
def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.next.tag']}", "--build-arg BASE=${p['docker.java.next.image']} --build-arg MONGODB=${p['docker.mongodb.8.0.version']} ci/openjdk23-mongodb-8.0/")
def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.next.tag']}", "--build-arg BASE=${p['docker.java.next.image']} --build-arg MONGODB=${p['docker.mongodb.8.0.version']} ci/openjdk24-mongodb-8.0/")
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
image.push()
}
Expand Down Expand Up @@ -99,7 +80,7 @@ pipeline {
steps {
script {
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
docker.image("springci/spring-data-with-mongodb-6.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
docker.image("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
sh 'ci/start-replica.sh'
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
"./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
Expand All @@ -118,27 +99,6 @@ pipeline {
}
}
parallel {
stage("test: MongoDB 7.0 (main)") {
agent {
label 'data'
}
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
}
steps {
script {
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
docker.image("springci/spring-data-with-mongodb-7.0:${p['java.main.tag']}").inside(p['docker.java.inside.docker']) {
sh 'ci/start-replica.sh'
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
"./mvnw -s settings.xml -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-mongodb clean dependency:list test -Dsort -U -B"
}
}
}
}
}

stage("test: MongoDB 8.0") {
agent {
Expand Down
25 changes: 0 additions & 25 deletions ci/openjdk17-mongodb-6.0/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions ci/openjdk17-mongodb-7.0/Dockerfile

This file was deleted.

9 changes: 4 additions & 5 deletions ci/pipeline.properties
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Java versions
java.main.tag=17.0.13_11-jdk-focal
java.next.tag=23.0.1_11-jdk-noble
java.main.tag=24.0.1_9-jdk-noble
java.next.tag=24.0.1_9-jdk-noble

# Docker container images - standard
docker.java.main.image=library/eclipse-temurin:${java.main.tag}
docker.java.next.image=library/eclipse-temurin:${java.next.tag}

# Supported versions of MongoDB
docker.mongodb.6.0.version=6.0.10
docker.mongodb.7.0.version=7.0.2
docker.mongodb.8.0.version=8.0.0
docker.mongodb.8.0.version=8.0.9

# Supported versions of Redis
docker.redis.6.version=6.2.13
docker.redis.7.version=7.2.4
docker.valkey.8.version=8.1.1

# Docker environment settings
docker.java.inside.basic=-v $HOME:/tmp/jenkins-home
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>4.5.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring Data MongoDB</name>
Expand All @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data.build</groupId>
<artifactId>spring-data-parent</artifactId>
<version>3.5.0-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
</parent>

<modules>
Expand All @@ -26,8 +26,8 @@
<properties>
<project.type>multi</project.type>
<dist.id>spring-data-mongodb</dist.id>
<springdata.commons>3.5.0-SNAPSHOT</springdata.commons>
<mongo>5.4.0</mongo>
<springdata.commons>4.0.0-SNAPSHOT</springdata.commons>
<mongo>5.5.0</mongo>
<jmh.version>1.19</jmh.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion spring-data-mongodb-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>4.5.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
93 changes: 84 additions & 9 deletions spring-data-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>4.5.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -67,12 +67,6 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -135,7 +129,7 @@
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>4.2.2</version>
<version>${awaitility}</version>
<scope>test</scope>
</dependency>

Expand All @@ -146,6 +140,13 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>net.javacrumbs.json-unit</groupId>
<artifactId>json-unit-assertj</artifactId>
<version>4.1.0</version>
<scope>test</scope>
</dependency>

<!-- CDI -->
<!-- Dependency order required to build against CDI 1.0 and test with CDI 2.0 -->
<dependency>
Expand Down Expand Up @@ -294,6 +295,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core-test</artifactId>
<scope>test</scope>
</dependency>

<!-- Kotlin extension -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
Expand Down Expand Up @@ -359,8 +366,76 @@

</dependencies>

<build>
<profiles>
<profile>
<id>nullaway</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>${querydsl}</version>
</path>
<path>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh}</version>
</path>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway}</version>
</path>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>java-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-Xplugin:ErrorProne -XepDisableAllChecks -Xep:NullAway:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:TreatGeneratedAsUnannotated=true -XepOpt:NullAway:CustomContractAnnotations=org.springframework.lang.Contract</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>java-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>

<plugin>
Expand Down
Loading