Releases: brandoneilers/anthropic-spring-boot-starter
Releases · brandoneilers/anthropic-spring-boot-starter
Release list
v0.1.1 — Fail-fast API key validation
What's changed
- Fail fast at startup when no Anthropic API key is configured. Previously, a missing key would only surface on the first actual API call — potentially deep in a request, in production, after deploy. Now
AnthropicAutoConfigurationchecks both the configuredanthropic.api-keyproperty and theANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKENenvironment variables at application startup, and throws immediately with an actionable error message if neither is present. - The check goes through Spring's
Environmentabstraction rather than rawSystem.getenv(), so it still honors the SDK's normal env var fallback while remaining fully unit-testable (no real OS env var manipulation required). - Two new tests covering both the failure case and the legitimate env-var-only configuration case.
Install
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.brandoneilers.anthropic-spring-boot-starter</groupId>
<artifactId>anthropic-spring-boot-starter</artifactId>
<version>v0.1.1</version>
</dependency>Full Changelog: v0.1.0...v0.1.1
v0.1.0 — Initial release
First release of the Anthropic Spring Boot Starter — auto-configuration for the Anthropic Java SDK, so a Spring Boot app gets a configured AnthropicClient and a chat convenience bean with zero manual wiring.
What's included
- Auto-configuration —
AnthropicClientandAnthropicChatServicebeans, activated automatically when the SDK is on the classpath, driven byanthropic.*properties AnthropicChatService— a thin convenience wrapper for the common "send a prompt, get text back" case; the rawAnthropicClientbean is still available for tool use, streaming, vision, etc.- Standard Spring Boot conventions —
@ConditionalOnClass,@ConditionalOnMissingBean,@ConfigurationProperties, so it composes cleanly with the rest of your app's configuration - Sample app (
anthropic-spring-boot-sample) — a minimal working Spring Boot app with a/api/chatendpoint - Full test suite, CI via GitHub Actions, JitPack support
Install
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.brandoneilers.anthropic-spring-boot-starter</groupId>
<artifactId>anthropic-spring-boot-starter</artifactId>
<version>v0.1.0</version>
</dependency>Requirements
Java 21+, Spring Boot 3.4.x, anthropic-java 2.52.0
See the README for configuration properties and usage examples.