Installation
Prerequisites
Section titled “Prerequisites”Kaumei JDBC currently requires JDK 25. Make sure your build and IDE use that runtime, as other Java versions are unsupported at the moment.
Add Kaumei JDBC dependencies to your pom.xml, either directly or inside dependency management.
- The
io.kaumei.jdbc:jdbc-annotationcontains only code that is needed during compile time, therefore its scope isprovided. There is no need to include this in another scope. - The
io.kaumei.jdbc:jdbc-corecontains boilerplate that is used by the generated code, therefore we keep it in the defaultcompilescope.
<properties> <kaumei-jdbc.version>develop-SNAPSHOT</kaumei-jdbc.version></properties><dependencies> <dependency> <groupId>io.kaumei.jdbc</groupId> <artifactId>jdbc-annotation</artifactId> <version>${kaumei-jdbc.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>io.kaumei.jdbc</groupId> <artifactId>jdbc-core</artifactId> <version>${kaumei-jdbc.version}</version> </dependency></dependencies>Enable annotation processing by configuring the compiler plugin. Currently, there are no known issues with the order in which the plugin is defined so far. If you encounter any issues, please let us know.
<plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <annotationProcessorPaths> <path> <groupId>io.kaumei.jdbc</groupId> <artifactId>jdbc-processor</artifactId> <version>${kaumei-jdbc.version}</version> </path> </annotationProcessorPaths> <compilerArgs> <arg>-Aio.kaumei.jdbc.processor.config=io.kaumei.jdbc.spec.ConfigSpec</arg> </compilerArgs> </configuration></plugin>IntelliJ
Section titled “IntelliJ”When you import the Maven project in IntelliJ IDEA, ensure annotation processing is enabled.
Open Build, Execution, Deployment > Compiler > Annotation Processors.
Tick Enable annotation processing.