Skip to content

Commit 81f3cc3

Browse files
authored
fix nexus-service-bean explicitConfig support (#2789)
1 parent ea2a094 commit 81f3cc3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

temporal-spring-boot-autoconfigure/src/main/java/io/temporal/spring/boot/autoconfigure/template/WorkersTemplate.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,11 +393,8 @@ private void createWorkerFromAnExplicitConfig(
393393
AopUtils.getTargetClass(bean),
394394
taskQueue);
395395
worker.registerNexusServiceImplementation(bean);
396-
addRegisteredNexusServiceImpl(
397-
worker,
398-
beanName,
399-
bean.getClass().getName(),
400-
ServiceImplInstance.fromInstance(AopUtils.getTargetClass(bean)).getDefinition());
396+
ServiceDefinition definition = ServiceImplInstance.fromInstance(bean).getDefinition();
397+
addRegisteredNexusServiceImpl(worker, beanName, bean.getClass().getName(), definition);
401398
});
402399
}
403400
}

temporal-spring-boot-autoconfigure/src/test/resources/application.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ spring:
101101
- io.temporal.spring.boot.autoconfigure.bytaskqueue.TestWorkflowImpl
102102
activity-beans:
103103
- TestActivityImpl
104+
nexus-service-beans:
105+
- TestNexusServiceImpl
104106

105107
---
106108
spring:

0 commit comments

Comments
 (0)