From 2e98101f02ea921081bbce42c968faf133cfb880 Mon Sep 17 00:00:00 2001 From: Mike Nichols Date: Wed, 18 Feb 2026 12:52:26 -0500 Subject: [PATCH] fix nexus-service-bean explicitConfig support --- .../boot/autoconfigure/template/WorkersTemplate.java | 7 ++----- .../src/test/resources/application.yml | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/temporal-spring-boot-autoconfigure/src/main/java/io/temporal/spring/boot/autoconfigure/template/WorkersTemplate.java b/temporal-spring-boot-autoconfigure/src/main/java/io/temporal/spring/boot/autoconfigure/template/WorkersTemplate.java index 870ede282..0f4809aed 100644 --- a/temporal-spring-boot-autoconfigure/src/main/java/io/temporal/spring/boot/autoconfigure/template/WorkersTemplate.java +++ b/temporal-spring-boot-autoconfigure/src/main/java/io/temporal/spring/boot/autoconfigure/template/WorkersTemplate.java @@ -393,11 +393,8 @@ private void createWorkerFromAnExplicitConfig( AopUtils.getTargetClass(bean), taskQueue); worker.registerNexusServiceImplementation(bean); - addRegisteredNexusServiceImpl( - worker, - beanName, - bean.getClass().getName(), - ServiceImplInstance.fromInstance(AopUtils.getTargetClass(bean)).getDefinition()); + ServiceDefinition definition = ServiceImplInstance.fromInstance(bean).getDefinition(); + addRegisteredNexusServiceImpl(worker, beanName, bean.getClass().getName(), definition); }); } } diff --git a/temporal-spring-boot-autoconfigure/src/test/resources/application.yml b/temporal-spring-boot-autoconfigure/src/test/resources/application.yml index fd1f25257..bf0260fed 100644 --- a/temporal-spring-boot-autoconfigure/src/test/resources/application.yml +++ b/temporal-spring-boot-autoconfigure/src/test/resources/application.yml @@ -101,6 +101,8 @@ spring: - io.temporal.spring.boot.autoconfigure.bytaskqueue.TestWorkflowImpl activity-beans: - TestActivityImpl + nexus-service-beans: + - TestNexusServiceImpl --- spring: