Skip to content

Commit aaa1cac

Browse files
Lidocamp911de
authored andcommitted
Document OpenFeign Querydsl usage.
Signed-off-by: Lidoca <32785562+Lidoca@users.noreply.github.com> Closes #3859
1 parent bc54aec commit aaa1cac

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

src/main/antora/modules/ROOT/pages/repositories/core-extensions.adoc

+93
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,99 @@ dependencies {
8080
====
8181
======
8282

83+
Or if you use an OpenFeign fork:
84+
85+
[tabs]
86+
======
87+
Maven::
88+
+
89+
[source,xml,indent=0,subs="verbatim,quotes",role="primary"]
90+
----
91+
<dependencies>
92+
<dependency>
93+
<groupId>io.github.openfeign.querydsl</groupId>
94+
<artifactId>querydsl-jpa</artifactId>
95+
<version>${querydslVersion}</version>
96+
</dependency>
97+
</dependencies>
98+
99+
<build>
100+
<plugins>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-compiler-plugin</artifactId>
104+
<configuration>
105+
<annotationProcessorPaths>
106+
<!-- Explicit opt-in required via annotationProcessors or
107+
annotationProcessorPaths on Java 22+, see https://bugs.openjdk.org/browse/JDK-8306819 -->
108+
<annotationProcessorPath>
109+
<groupId>io.github.openfeign.querydsl</groupId>
110+
<artifactId>querydsl-apt</artifactId>
111+
<version>${querydslVersion}</version>
112+
<classifier>jpa</classifier>
113+
</annotationProcessorPath>
114+
<annotationProcessorPath>
115+
<groupId>jakarta.persistence</groupId>
116+
<artifactId>jakarta.persistence-api</artifactId>
117+
</annotationProcessorPath>
118+
</annotationProcessorPaths>
119+
</configuration>
120+
</plugin>
121+
122+
<!-- Recommended: Some IDE's might require this configuration to include generated sources for IDE usage -->
123+
<plugin>
124+
<groupId>org.codehaus.mojo</groupId>
125+
<artifactId>build-helper-maven-plugin</artifactId>
126+
<version>3.6.0</version>
127+
<executions>
128+
<execution>
129+
<id>add-source</id>
130+
<phase>generate-sources</phase>
131+
<goals>
132+
<goal>add-source</goal>
133+
</goals>
134+
<configuration>
135+
<sources>
136+
<source>target/generated-sources</source>
137+
</sources>
138+
</configuration>
139+
</execution>
140+
<execution>
141+
<id>add-test-source</id>
142+
<phase>generate-test-sources</phase>
143+
<goals>
144+
<goal>add-test-source</goal>
145+
</goals>
146+
<configuration>
147+
<sources>
148+
<source>target/generated-test-sources</source>
149+
</sources>
150+
</configuration>
151+
</execution>
152+
</executions>
153+
</plugin>
154+
</plugins>
155+
</build>
156+
----
157+
158+
Gradle::
159+
+
160+
====
161+
[source,groovy,indent=0,subs="verbatim,quotes",role="secondary"]
162+
----
163+
dependencies {
164+
165+
implementation "io.github.openfeign.querydsl:querydsl-jpa:${querydslVersion}"
166+
annotationProcessor "io.github.openfeign.querydsl:querydsl-apt:${querydslVersion}:jpa"
167+
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
168+
169+
testAnnotationProcessor "io.github.openfeign.querydsl:querydsl-apt:${querydslVersion}:jpa"
170+
testAnnotationProcessor 'jakarta.persistence:jakarta.persistence-api'
171+
}
172+
----
173+
====
174+
======
175+
83176
Note that the setup above shows the simplemost usage omitting any other options or dependencies that your project might require.
84177

85178
include::{commons}@data-commons::page$repositories/core-extensions-web.adoc[leveloffset=1]

0 commit comments

Comments
 (0)