Skip to content

Commit 9c81ce4

Browse files
senocakbsbodden
andauthored
docs:: breaking changes for Java 23 annotation processing (#710)
* Document breaking changes for Java 23 annotation processing Added information about breaking changes in annotation processing with Java 23 and provided a Maven configuration example. * Include Gradle example in migration guide Add Gradle example for JavaCompile configuration. --------- Co-authored-by: Brian Sam-Bodden <bsb@redis.com>
1 parent a1a29c8 commit 9c81ce4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/content/modules/ROOT/pages/migration-guide.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,45 @@ Redis OM Spring 1.1.0 introduces support for Spring Boot 3.5.x and includes impo
196196

197197
=== Breaking Changes
198198

199+
==== Annotation Processing with Java 23+ (including Java 25)
200+
201+
When upgrading to **Java 23 or newer (e.g. Java 25)**, note that the Java compiler (`javac`) no longer runs annotation processors found on the classpath **by default**.
202+
203+
This change affects **Redis OM Spring metamodel generation** (the generated classes ending with `$`, used by `EntityStream` APIs).
204+
With **Java 21 and earlier**, these classes were generated automatically without any additional build configuration.
205+
206+
Starting with **Java 23+**, annotation processing must be **explicitly enabled** in the build.
207+
Otherwise, metamodel classes will not be generated and compilation errors referencing missing `$` classes may occur.
208+
209+
### Maven example
210+
211+
```xml
212+
<plugin>
213+
<groupId>org.apache.maven.plugins</groupId>
214+
<artifactId>maven-compiler-plugin</artifactId>
215+
<configuration>
216+
<compilerArgs>
217+
<arg>-proc:full</arg>
218+
</compilerArgs>
219+
<annotationProcessorPaths>
220+
<path>
221+
<groupId>com.redis.om</groupId>
222+
<artifactId>redis-om-spring</artifactId>
223+
<version>${redis.om.spring.version}</version>
224+
</path>
225+
</annotationProcessorPaths>
226+
</configuration>
227+
</plugin>
228+
```
229+
230+
### Gradle example
231+
232+
```
233+
tasks.withType(JavaCompile).configureEach {
234+
options.compilerArgs += "-proc:full"
235+
}
236+
```
237+
199238
==== Jedis 6.0.0 Query Escaping
200239

201240
**Impact:** Users writing custom RediSearch queries using Jedis directly.

0 commit comments

Comments
 (0)