Mark CouchbaseAnnotationProcessor for auto-discovery. (#1871)
Closes #1870
This commit is contained in:
committed by
mikereiche
parent
b5dc1a23ed
commit
8b87abbff0
57
pom.xml
57
pom.xml
@@ -23,8 +23,6 @@
|
|||||||
<springdata.commons>3.0.13-SNAPSHOT</springdata.commons>
|
<springdata.commons>3.0.13-SNAPSHOT</springdata.commons>
|
||||||
<java-module-name>spring.data.couchbase</java-module-name>
|
<java-module-name>spring.data.couchbase</java-module-name>
|
||||||
<hibernate.validator>7.0.1.Final</hibernate.validator>
|
<hibernate.validator>7.0.1.Final</hibernate.validator>
|
||||||
<apt>1.1.3</apt>
|
|
||||||
<querydsl>5.0.0</querydsl>
|
|
||||||
<mysema.querydsl>3.7.4</mysema.querydsl>
|
<mysema.querydsl>3.7.4</mysema.querydsl>
|
||||||
<couchbase.encryption>3.1.0</couchbase.encryption>
|
<couchbase.encryption>3.1.0</couchbase.encryption>
|
||||||
<jodatime>2.10.13</jodatime>
|
<jodatime>2.10.13</jodatime>
|
||||||
@@ -249,6 +247,37 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.querydsl</groupId>
|
||||||
|
<artifactId>querydsl-apt</artifactId>
|
||||||
|
<version>${querydsl}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<configuration>
|
||||||
|
<proc>none</proc>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>test-annotation-processing</id>
|
||||||
|
<phase>generate-test-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>testCompile</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<proc>only</proc>
|
||||||
|
<annotationProcessors>
|
||||||
|
<annotationProcessor>org.springframework.data.couchbase.repository.support.CouchbaseAnnotationProcessor</annotationProcessor>
|
||||||
|
</annotationProcessors>
|
||||||
|
<generatedTestSourcesDirectory>target/generated-test-sources</generatedTestSourcesDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
@@ -292,30 +321,6 @@
|
|||||||
<groupId>org.asciidoctor</groupId>
|
<groupId>org.asciidoctor</groupId>
|
||||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>com.mysema.maven</groupId>
|
|
||||||
<artifactId>apt-maven-plugin</artifactId>
|
|
||||||
<version>${apt}</version>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.querydsl</groupId>
|
|
||||||
<artifactId>querydsl-apt</artifactId>
|
|
||||||
<version>${querydsl}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>generate-test-sources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test-process</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<outputDirectory>target/generated-test-sources</outputDirectory>
|
|
||||||
<processor>org.springframework.data.couchbase.repository.support.CouchbaseAnnotationProcessor</processor>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,51 @@ public class Config extends AbstractCouchbaseConfiguration {
|
|||||||
|
|
||||||
An advanced usage is described in <<couchbase.repository.multibucket>>.
|
An advanced usage is described in <<couchbase.repository.multibucket>>.
|
||||||
|
|
||||||
|
[[couchbase.repository.configuration.dsl]]
|
||||||
|
=== QueryDSL Configuration
|
||||||
|
Spring Data Couchbase supports QueryDSL for building type-safe queries. To enable code generation you need to set `spring-data-couchbase` as annotation processor on your project.
|
||||||
|
|
||||||
|
.Maven Configuration Example
|
||||||
|
====
|
||||||
|
[source,xml]
|
||||||
|
----
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>[compiler-plugin-version]</version>
|
||||||
|
<configuration>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<!-- path to the annotation processor -->
|
||||||
|
<path>
|
||||||
|
<groupId>com.querydsl</groupId>
|
||||||
|
<artifactId>querydsl-apt</artifactId>
|
||||||
|
<version>[version]</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>org.springframework.data</groupId>
|
||||||
|
<artifactId>spring-data-couchbase</artifactId>
|
||||||
|
<version>[version]</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
----
|
||||||
|
====
|
||||||
|
|
||||||
|
.Gradle Configuration Example
|
||||||
|
====
|
||||||
|
[source,groovy]
|
||||||
|
----
|
||||||
|
annotationProcessor 'com.querydsl:querydsl-apt:${querydslVersion}'
|
||||||
|
annotationProcessor 'org.springframework.data:spring-data-couchbase:${springDataCouchbaseVersion}'
|
||||||
|
----
|
||||||
|
====
|
||||||
|
|
||||||
[[couchbase.repository.usage]]
|
[[couchbase.repository.usage]]
|
||||||
== Usage
|
== Usage
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
org.springframework.data.couchbase.repository.support.CouchbaseAnnotationProcessor
|
||||||
Reference in New Issue
Block a user