Skip to content

Commit df3ec0e

Browse files
Clean up Spring AI samples PR for merge
- Remove committed build/ directories and add them to .gitignore. - Gate includeBuild('../sdk-java') on sibling checkout existence so the build works out-of-the-box when the springai samples are not being touched (and will resolve cleanly once temporal-spring-ai publishes). - core: pin io.grpc:grpc-util version explicitly and switch the SSL sample to AdvancedTlsX509KeyManager.updateIdentityCredentials (non-deprecated API) to fix compilation under -Werror with the composite-build grpc. - springai-multimodel: fix doc mismatch on model names, route unprefixed input to the "default" model, drop hard-coded model-version hints from system prompts. - springai-rag: correct Javadoc to match actual code (no EmbeddingModelActivity), accept bare "ask" as a usage-prompt trigger, normalize text block indentation. - springai-mcp: fix advisor name comment, normalize text block indentation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ddc7720 commit df3ec0e

48 files changed

Lines changed: 55 additions & 276 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ target
99
/core/build
1010
/springboot/build
1111
/springboot-basic/build
12+
/springai/build
13+
/springai-mcp/build
14+
/springai-multimodel/build
15+
/springai-rag/build
1216
/out
1317
/core/out
1418
/springboot/out

core/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ dependencies {
77
// Environment configuration
88
implementation "io.temporal:temporal-envconfig:$javaSDKVersion"
99

10-
// Needed for SSL sample (AdvancedTlsX509KeyManager)
11-
implementation "io.grpc:grpc-util"
10+
// AdvancedTlsX509KeyManager used by the SSL sample. Pinned explicitly so this
11+
// module resolves it regardless of the SDK's transitive grpc version (needed
12+
// in particular when substituting the SDK via composite build).
13+
implementation "io.grpc:grpc-util:1.75.0"
1214

1315
// Needed for SDK related functionality
1416
implementation(platform("com.fasterxml.jackson:jackson-bom:2.17.2"))

core/src/main/java/io/temporal/samples/ssl/Starter.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,12 @@ public static void main(String[] args) throws Exception {
5050
if (refreshPeriod > 0) {
5151
AdvancedTlsX509KeyManager clientKeyManager = new AdvancedTlsX509KeyManager();
5252
// Reload credentials every minute
53-
@SuppressWarnings("InlineMeInliner")
54-
var unused =
55-
clientKeyManager.updateIdentityCredentialsFromFile(
56-
clientKeyFile,
57-
clientCertFile,
58-
refreshPeriod,
59-
TimeUnit.MINUTES,
60-
Executors.newScheduledThreadPool(1));
53+
clientKeyManager.updateIdentityCredentials(
54+
clientCertFile,
55+
clientKeyFile,
56+
refreshPeriod,
57+
TimeUnit.MINUTES,
58+
Executors.newScheduledThreadPool(1));
6159
sslContext =
6260
GrpcSslContexts.configure(SslContextBuilder.forClient().keyManager(clientKeyManager))
6361
.build();

settings.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ include 'springboot'
88
include 'springboot-basic'
99

1010
// Include local sdk-java build for temporal-spring-ai (until published to Maven Central).
11-
// temporal-spring-ai requires the plugin API (SimplePlugin) which is not yet in a released SDK,
12-
// so we substitute all SDK modules from the local build.
13-
includeBuild('../sdk-java') {
14-
dependencySubstitution {
15-
substitute module('io.temporal:temporal-spring-ai') using project(':temporal-spring-ai')
16-
substitute module('io.temporal:temporal-sdk') using project(':temporal-sdk')
17-
substitute module('io.temporal:temporal-serviceclient') using project(':temporal-serviceclient')
18-
substitute module('io.temporal:temporal-spring-boot-autoconfigure') using project(':temporal-spring-boot-autoconfigure')
19-
substitute module('io.temporal:temporal-spring-boot-starter') using project(':temporal-spring-boot-starter')
20-
substitute module('io.temporal:temporal-testing') using project(':temporal-testing')
21-
substitute module('io.temporal:temporal-opentracing') using project(':temporal-opentracing')
11+
// temporal-spring-ai is not yet in a released SDK, so we substitute all SDK modules from the
12+
// local build when the sibling ../sdk-java checkout is available. Without the checkout, the
13+
// springai* modules will fail to resolve io.temporal:temporal-spring-ai — that's expected
14+
// until the artifact is published.
15+
if (file('../sdk-java').exists()) {
16+
includeBuild('../sdk-java') {
17+
dependencySubstitution {
18+
substitute module('io.temporal:temporal-spring-ai') using project(':temporal-spring-ai')
19+
substitute module('io.temporal:temporal-sdk') using project(':temporal-sdk')
20+
substitute module('io.temporal:temporal-serviceclient') using project(':temporal-serviceclient')
21+
substitute module('io.temporal:temporal-spring-boot-autoconfigure') using project(':temporal-spring-boot-autoconfigure')
22+
substitute module('io.temporal:temporal-spring-boot-starter') using project(':temporal-spring-boot-starter')
23+
substitute module('io.temporal:temporal-testing') using project(':temporal-testing')
24+
substitute module('io.temporal:temporal-opentracing') using project(':temporal-opentracing')
25+
}
2226
}
2327
}

springai-mcp/build/bootRunMainClassName

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.

springai-mcp/build/resources/main/application.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)