Skip to content

feat(java): add Spring Boot 3 starter module#347

Merged
pratyush618 merged 2 commits into
masterfrom
feat/java-contrib-spring
Jul 1, 2026
Merged

feat(java): add Spring Boot 3 starter module#347
pratyush618 merged 2 commits into
masterfrom
feat/java-contrib-spring

Conversation

@pratyush618

@pratyush618 pratyush618 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What

Adds taskito-spring — a Spring Boot 3 starter (separate Gradle module :spring) that auto-configures a Taskito bean from application properties.

  • TaskitoAutoConfiguration@AutoConfiguration gated on @ConditionalOnClass(Taskito.class); contributes a single Taskito bean (@ConditionalOnMissingBean, destroyMethod = "close" so it closes with the context). Define your own Taskito bean to override.
  • TaskitoProperties@ConfigurationProperties for url/poolSize/namespace; unset values fall through to builder defaults.
  • Registered via META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports.
  • Module targets Java 17 (Spring Boot 3's floor = the SDK baseline). Spring deps live only in this module — the core SDK stays framework-free.

Test

TaskitoAutoConfigurationTestApplicationContextRunner asserts the bean is created from properties and that a user-defined Taskito bean overrides the auto-config.

./gradlew build green (JDK 17 build leg + 21/25 test legs).

Summary by CodeRabbit

  • New Features

    • Added a Spring Boot starter module for Java users.
    • The library can now auto-configure a Taskito bean from taskito.* settings when included on the classpath.
    • Added configurable settings for connection URL, pool size, and namespace.
    • Registered the new Spring module so it is discovered automatically at startup.
  • Tests

    • Added coverage to verify the Spring auto-configuration creates a Taskito bean successfully.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new spring Gradle subproject implementing a Spring Boot 3 auto-configuration starter for Taskito. It registers the module in settings, defines its build script, adds TaskitoProperties, TaskitoAutoConfiguration, package documentation, an auto-configuration import registration, and a corresponding test.

Changes

Taskito Spring Boot Starter

Layer / File(s) Summary
Module registration and build configuration
sdks/java/settings.gradle.kts, sdks/java/spring/build.gradle.kts
Registers the spring subproject and configures its Gradle build: Java 17 plugins, Maven Central repository, Spring Boot dependency versions, api/compileOnly/test dependencies, Spotless formatting, and Checkstyle.
Auto-configuration properties and bean
sdks/java/spring/src/main/java/org/byteveda/taskito/spring/TaskitoProperties.java, .../TaskitoAutoConfiguration.java, .../package-info.java, sdks/java/spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
Adds TaskitoProperties bound to taskito.*, TaskitoAutoConfiguration that conditionally builds and registers a Taskito bean, package Javadoc, and registration of the auto-configuration class in Spring's imports file.
Auto-configuration test
sdks/java/spring/src/test/java/org/byteveda/taskito/spring/TaskitoAutoConfigurationTest.java
Adds a test using ApplicationContextRunner to verify context startup and presence of the Taskito bean.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ComponentA
  participant ComponentB
  ComponentA->>ComponentB: observable interaction
Loading

Related PRs: None found.

Suggested labels: enhancement, java, spring

Suggested reviewers: None found.

🐰 A starter hops into the build,
With properties neatly assembled,
A Taskito bean, conditionally filled,
Auto-config quietly compiled,
Tests confirm the burrow's built. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main change: adding a new Spring Boot 3 starter module for Java.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/java-contrib-spring

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
sdks/java/spring/src/test/java/org/byteveda/taskito/spring/TaskitoAutoConfigurationTest.java (2)

23-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer assertNull for clarity.

♻️ Suggested fix
-            assertTrue(ctx.getStartupFailure() == null);
+            assertNull(ctx.getStartupFailure());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@sdks/java/spring/src/test/java/org/byteveda/taskito/spring/TaskitoAutoConfigurationTest.java`
at line 23, The assertion in TaskitoAutoConfigurationTest is using a manual null
comparison instead of the clearer assertion helper. Update the startup failure
check to use assertNull on ctx.getStartupFailure() so the test intent is
explicit and consistent with the other assertions in this class.

14-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing test for user-bean override / back-off behavior.

The PR objectives state tests should cover "bean creation from properties and override behavior," and TaskitoAutoConfiguration relies on @ConditionalOnMissingBean to back off when a user defines their own Taskito bean — but only the property-driven creation path is tested here. Consider adding a test that registers a user-defined Taskito bean via a @Configuration class and asserts the auto-configured bean does not override it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@sdks/java/spring/src/test/java/org/byteveda/taskito/spring/TaskitoAutoConfigurationTest.java`
around lines 14 - 27, Add a second test in TaskitoAutoConfigurationTest to cover
back-off behavior for TaskitoAutoConfiguration. Register a user-provided Taskito
bean through a nested `@Configuration` (or similar test config) in the
ApplicationContextRunner, then assert the context contains that bean and the
auto-configured Taskito does not replace it. Use the existing
TaskitoAutoConfiguration and Taskito symbols to keep the test aligned with the
`@ConditionalOnMissingBean` behavior.
sdks/java/spring/build.gradle.kts (1)

9-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hardcoded version duplicates root project version.

version = "0.18.0" is a separate literal from the root project's version. This can silently drift out of sync when the root SDK version is bumped but this module's build file isn't updated in lockstep.

♻️ Suggested fix
-group = "org.byteveda"
-
-version = "0.18.0"
+group = "org.byteveda"
+
+version = rootProject.version
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sdks/java/spring/build.gradle.kts` around lines 9 - 11, The Spring build
script is hardcoding a module version that can drift from the root project
version. Update the version assignment in the build logic to derive from the
root project’s version instead of a string literal, and keep the existing group
setup intact. Use the build script’s version configuration in this module so it
stays synchronized with the root version automatically.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@sdks/java/spring/build.gradle.kts`:
- Around line 9-11: The Spring build script is hardcoding a module version that
can drift from the root project version. Update the version assignment in the
build logic to derive from the root project’s version instead of a string
literal, and keep the existing group setup intact. Use the build script’s
version configuration in this module so it stays synchronized with the root
version automatically.

In
`@sdks/java/spring/src/test/java/org/byteveda/taskito/spring/TaskitoAutoConfigurationTest.java`:
- Line 23: The assertion in TaskitoAutoConfigurationTest is using a manual null
comparison instead of the clearer assertion helper. Update the startup failure
check to use assertNull on ctx.getStartupFailure() so the test intent is
explicit and consistent with the other assertions in this class.
- Around line 14-27: Add a second test in TaskitoAutoConfigurationTest to cover
back-off behavior for TaskitoAutoConfiguration. Register a user-provided Taskito
bean through a nested `@Configuration` (or similar test config) in the
ApplicationContextRunner, then assert the context contains that bean and the
auto-configured Taskito does not replace it. Use the existing
TaskitoAutoConfiguration and Taskito symbols to keep the test aligned with the
`@ConditionalOnMissingBean` behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c48c3c13-8164-4cfa-a6c1-69b5e85ba6d1

📥 Commits

Reviewing files that changed from the base of the PR and between 3b16a0b and 3ba24e5.

📒 Files selected for processing (7)
  • sdks/java/settings.gradle.kts
  • sdks/java/spring/build.gradle.kts
  • sdks/java/spring/src/main/java/org/byteveda/taskito/spring/TaskitoAutoConfiguration.java
  • sdks/java/spring/src/main/java/org/byteveda/taskito/spring/TaskitoProperties.java
  • sdks/java/spring/src/main/java/org/byteveda/taskito/spring/package-info.java
  • sdks/java/spring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • sdks/java/spring/src/test/java/org/byteveda/taskito/spring/TaskitoAutoConfigurationTest.java

@pratyush618 pratyush618 changed the title feat(java): Spring Boot 3 starter module feat(java): add Spring Boot 3 starter module Jul 1, 2026
@pratyush618 pratyush618 self-assigned this Jul 1, 2026
@pratyush618 pratyush618 merged commit a2c0186 into master Jul 1, 2026
18 of 20 checks passed
@pratyush618 pratyush618 deleted the feat/java-contrib-spring branch July 1, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant