Migration Guide
This guide summarizes the externally visible changes made while closing phases 1-3.
Backward Compatibility Contract
Spring Prism v1.1.0 is a minor release and keeps v1.0.0 integrations working by default.
- The legacy
PrismMetricsSnapshotconstructor remains available for custom integrations compiled againstv1.0.0. - Legacy strict-mode properties remain functional, but are deprecated in favor of
spring.prism.failure-mode. - Custom
PrismRulePackbeans no longer become active automatically unless they explicitly opt in throughisAutoDiscoverable(). - The starter now prefers the modular
prism-rulepack-commonbaseline forUNIVERSALdetection, while legacy in-coreUniversalRulePackremains available for directprism-coreconsumers. - In Spring applications, inject
@Qualifier("springPrismRulePacks") List<PrismRulePack>when you need the resolved active rule packs after starter locale selection and filtering. - Injecting plain
List<PrismRulePack>gives you the available rule pack beans from the context, which can include optional modular contributions and compatibility fallbacks. - Legacy in-core
EuropeRulePackalso remains available for directprism-coreconsumers in1.x, but is deprecated in favor of the modular regional rulepacks.
Deprecation
Property spring.prism.security-strict-mode is deprecated and will be removed in v2.0.0. Use
spring.prism.failure-mode instead.
Current Integration Shape
- Prefer the Spring Boot starter as the default integration entrypoint.
- Spring AI support is exposed through
PrismChatClientAdvisor. - LangChain4j support is exposed through
PrismChatModelandPrismStreamingChatModel.
Starter Defaults
spring.prism.enableddefaults totrue.spring.prism.ttldefaults to30m.spring.prism.localesdefaults toUNIVERSAL.spring.prism.failure-modedefaults toFAIL_SAFE.- blank or missing
spring.prism.app-secretfalls back tospring-prism-change-me, but real deployments must override it.
Spring AI
- The current Spring AI path is starter-first.
- If you wire manually, use the current constructor shape:
new PrismChatClientAdvisor(List.of(rulePack), prismVault, ObservationRegistry.NOOP)
LangChain4j
- LangChain4j support now ships as a first-class module.
- If the starter sees a single delegate
ChatModelbean, it publishes a primaryPrismChatModelwrapper. - If the starter sees a single delegate
StreamingChatModelbean, it publishes a primaryPrismStreamingChatModelwrapper.
Redis Vault Selection
- The starter now exposes
spring.prism.vault.typewithauto,in-memory, andredis. autopreserves the previous ergonomic behavior: if aStringRedisTemplatebean is present, the starter switches toRedisPrismVaultautomatically.redisis the recommended explicit choice for multi-node deployments and fails fast when no shared Redis bean is configured.in-memorykeepsDefaultPrismVaulteven if Redis is on the classpath.
Recommended Upgrade Path
- Move to
prism-spring-boot-starterif you were wiring components manually. - Set an explicit
spring.prism.app-secret. - Move from
spring.prism.security-strict-modetospring.prism.failure-modewhen you want explicit policy control. UseFAIL_CLOSEDfor hard blocking andFAIL_SAFEto preserve the legacy default. - Choose
spring.prism.vault.type=redisfor multi-node deployments and keep all nodes on the same app secret and shared Redis infrastructure. - Verify your active locales and disabled rules explicitly in configuration.
- If your application defines custom
PrismRulePackbeans and you want them auto-activated by the starter, overrideisAutoDiscoverable()to returntrue. - For LangChain4j applications, expose one delegate chat bean and let the starter wrap it.
- If you instantiate
UniversalRulePackdirectly fromprism-core, you can keep doing so in1.x; the modular starter path is additive and does not remove the legacy class until2.0.0. - If you instantiate
EuropeRulePackdirectly fromprism-core, you can also keep doing so in1.x; move to the regional modules before2.0.0.