|
1 | 1 | [[upgrade-notes]]
|
2 | 2 | = Upgrade Notes
|
3 | 3 |
|
| 4 | +[[upgrading-to-1-0-0-snapshot]] |
| 5 | +== Upgrading to 1.0.0-SNAPSHOT |
| 6 | + |
| 7 | +You can upgrade to 1.0.0-SNAPSHOT either by following the manual steps outlined below or by using an automated approach with the Claude Code CLI tool and a provided prompt. |
| 8 | + |
| 9 | +The automated approach can save time and reduce errors when upgrading multiple projects or complex codebases. |
| 10 | +For details on the automated approach, see the xref:upgrade-notes.adoc#automating-upgrading-using-ai[Automating upgrading using AI] section. |
| 11 | + |
| 12 | +=== Manual Upgrade |
| 13 | + |
| 14 | +==== Add Snapshot Repositories |
| 15 | + |
| 16 | +To use the 1.0.0-SNAPSHOT version, you need to add the snapshot repositories to your build file. |
| 17 | +For detailed instructions, refer to the xref:getting-started.adoc#snapshots-add-snapshot-repositories[Snapshots - Add Snapshot Repositories] section in the Getting Started guide. |
| 18 | + |
| 19 | +==== Update Dependency Management |
| 20 | + |
| 21 | +Update your Spring AI BOM version to `1.0.0-SNAPSHOT` in your build configuration. |
| 22 | +For detailed instructions on configuring dependency management, refer to the xref:getting-started.adoc#dependency-management[Dependency Management] section in the Getting Started guide. |
| 23 | + |
| 24 | +==== Changes to Spring AI Artifact IDs |
| 25 | + |
| 26 | +The naming pattern for Spring AI starter artifacts has changed in 1.0.0-SNAPSHOT. |
| 27 | +You'll need to update your dependencies according to the following patterns: |
| 28 | + |
| 29 | +* Model starters: `spring-ai-\{model\}-spring-boot-starter` → `spring-ai-starter-model-\{model\}` |
| 30 | +* Vector Store starters: `spring-ai-\{store\}-store-spring-boot-starter` → `spring-ai-starter-vector-store-\{store\}` |
| 31 | +* MCP starters: `spring-ai-mcp-\{type\}-spring-boot-starter` → `spring-ai-starter-mcp-\{type\}` |
| 32 | + |
| 33 | +===== Examples |
| 34 | + |
| 35 | +[tabs] |
| 36 | +====== |
| 37 | +Maven:: |
| 38 | ++ |
| 39 | +[source,xml,indent=0,subs="verbatim,quotes"] |
| 40 | +---- |
| 41 | +<!-- BEFORE --> |
| 42 | +<dependency> |
| 43 | + <groupId>org.springframework.ai</groupId> |
| 44 | + <artifactId>spring-ai-openai-spring-boot-starter</artifactId> |
| 45 | +</dependency> |
| 46 | +
|
| 47 | +<!-- AFTER --> |
| 48 | +<dependency> |
| 49 | + <groupId>org.springframework.ai</groupId> |
| 50 | + <artifactId>spring-ai-starter-model-openai</artifactId> |
| 51 | +</dependency> |
| 52 | +---- |
| 53 | +
|
| 54 | +Gradle:: |
| 55 | ++ |
| 56 | +[source,groovy,indent=0,subs="verbatim,quotes"] |
| 57 | +---- |
| 58 | +// BEFORE |
| 59 | +implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter' |
| 60 | +implementation 'org.springframework.ai:spring-ai-redis-store-spring-boot-starter' |
| 61 | +
|
| 62 | +// AFTER |
| 63 | +implementation 'org.springframework.ai:spring-ai-starter-model-openai' |
| 64 | +implementation 'org.springframework.ai:spring-ai-starter-vector-store-redis' |
| 65 | +---- |
| 66 | +====== |
| 67 | + |
| 68 | +==== Changes to Spring AI Autoconfiguration Artifacts |
| 69 | + |
| 70 | +The Spring AI autoconfiguration has changed from a single monolithic artifact to individual autoconfiguration artifacts per model, vector store, and other components. |
| 71 | +This change was made to minimize the impact of different versions of dependent libraries conflicting, such as Google Protocol Buffers, Google RPC, and others. |
| 72 | +By separating autoconfiguration into component-specific artifacts, you can avoid pulling in unnecessary dependencies and reduce the risk of version conflicts in your application. |
| 73 | + |
| 74 | +The original monolithic artifact is no longer available: |
| 75 | + |
| 76 | +[source,xml,indent=0,subs="verbatim,quotes"] |
| 77 | +---- |
| 78 | +<!-- NO LONGER AVAILABLE --> |
| 79 | +<dependency> |
| 80 | + <groupId>org.springframework.ai</groupId> |
| 81 | + <artifactId>spring-ai-spring-boot-autoconfigure</artifactId> |
| 82 | + <version>${project.version}</version> |
| 83 | +</dependency> |
| 84 | +---- |
| 85 | + |
| 86 | +Instead, each component now has its own autoconfiguration artifact following these patterns: |
| 87 | + |
| 88 | +* Model autoconfiguration: `spring-ai-autoconfigure-model-\{model\}` |
| 89 | +* Vector Store autoconfiguration: `spring-ai-autoconfigure-vector-store-\{store\}` |
| 90 | +* MCP autoconfiguration: `spring-ai-autoconfigure-mcp-\{type\}` |
| 91 | + |
| 92 | +===== Examples of New Autoconfiguration Artifacts |
| 93 | + |
| 94 | +[tabs] |
| 95 | +====== |
| 96 | +Models:: |
| 97 | ++ |
| 98 | +[source,xml,indent=0,subs="verbatim,quotes"] |
| 99 | +---- |
| 100 | +<dependency> |
| 101 | + <groupId>org.springframework.ai</groupId> |
| 102 | + <artifactId>spring-ai-autoconfigure-model-openai</artifactId> |
| 103 | +</dependency> |
| 104 | +
|
| 105 | +<dependency> |
| 106 | + <groupId>org.springframework.ai</groupId> |
| 107 | + <artifactId>spring-ai-autoconfigure-model-anthropic</artifactId> |
| 108 | +</dependency> |
| 109 | +
|
| 110 | +<dependency> |
| 111 | + <groupId>org.springframework.ai</groupId> |
| 112 | + <artifactId>spring-ai-autoconfigure-model-vertex-ai</artifactId> |
| 113 | +</dependency> |
| 114 | +---- |
| 115 | +
|
| 116 | +Vector Stores:: |
| 117 | ++ |
| 118 | +[source,xml,indent=0,subs="verbatim,quotes"] |
| 119 | +---- |
| 120 | +<dependency> |
| 121 | + <groupId>org.springframework.ai</groupId> |
| 122 | + <artifactId>spring-ai-autoconfigure-vector-store-redis</artifactId> |
| 123 | +</dependency> |
| 124 | +
|
| 125 | +<dependency> |
| 126 | + <groupId>org.springframework.ai</groupId> |
| 127 | + <artifactId>spring-ai-autoconfigure-vector-store-pgvector</artifactId> |
| 128 | +</dependency> |
| 129 | +
|
| 130 | +<dependency> |
| 131 | + <groupId>org.springframework.ai</groupId> |
| 132 | + <artifactId>spring-ai-autoconfigure-vector-store-chroma</artifactId> |
| 133 | +</dependency> |
| 134 | +---- |
| 135 | +
|
| 136 | +MCP:: |
| 137 | ++ |
| 138 | +[source,xml,indent=0,subs="verbatim,quotes"] |
| 139 | +---- |
| 140 | +<dependency> |
| 141 | + <groupId>org.springframework.ai</groupId> |
| 142 | + <artifactId>spring-ai-autoconfigure-mcp-client</artifactId> |
| 143 | +</dependency> |
| 144 | +
|
| 145 | +<dependency> |
| 146 | + <groupId>org.springframework.ai</groupId> |
| 147 | + <artifactId>spring-ai-autoconfigure-mcp-server</artifactId> |
| 148 | +</dependency> |
| 149 | +---- |
| 150 | +====== |
| 151 | + |
| 152 | +NOTE: In most cases, you won't need to explicitly add these autoconfiguration dependencies. |
| 153 | +They are included transitively when using the corresponding starter dependencies. |
| 154 | + |
| 155 | + |
| 156 | +[[automating-upgrading-using-ai]] |
| 157 | +=== Automating upgrading using AI |
| 158 | + |
| 159 | +You can automate the upgrade process to 1.0.0-SNAPSHOT using the Claude Code CLI tool with a provided prompt. The prompt will guide the AI to perform the following tasks: |
| 160 | + |
| 161 | +1. Update the Spring AI BOM version to 1.0.0-SNAPSHOT |
| 162 | +2. Ensure all required repositories exist in your build configuration |
| 163 | +3. Update Spring AI artifact IDs according to the new naming patterns |
| 164 | + |
| 165 | +To use this automation: |
| 166 | + |
| 167 | +1. Download the https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview[Claude Code CLI tool] |
| 168 | +2. Copy the prompt from the https://github.com/spring-projects/spring-ai/blob/main/src/prompts/update-to-snapshot.txt[update-to-snapshot.txt] file |
| 169 | +3. Paste the prompt into the Claude Code CLI |
| 170 | +4. The AI will analyze your project and make the necessary changes |
| 171 | + |
| 172 | +This approach can save time and reduce the chance of errors when upgrading multiple projects or complex codebases. |
| 173 | + |
| 174 | + |
4 | 175 | == Upgrading to 1.0.0.M6
|
5 | 176 |
|
6 | 177 |
|
|
0 commit comments