How to have host specific queues when using Temporal with Spring boot

I have a single workflow with multiple activities and multiple workers deployed as Spring boot pods.
1st activity generates a file on local disk and can run on any worker, but the subsequent activities which process and upload the file to server must run on the same worker (as file path is local to worker node’s disk).
I see samples-java/core/src/main/java/io/temporal/samples/fileprocessing at main · temporalio/samples-java · GitHub which does something similar by dynamically generating host specific task queues.
Is there any example on how to adapt this to use with Spring boot by injecting some custom bean perhaps? I don’t want to start worker as a separate process from the spring boot server as I don’t want to lose on some Spring specific features.

What I tried?
I did try defining 2 different Worker beans workerForCommonTaskQueue and workerForHostSpecificTaskQueue but am not sure how to ensure one of them starts the worker factory.

I was able to achieve this by injecting a custom hostSpecific worker bean

@Bean
  public Worker hostSpecificWorker(WorkerFactory factory, UploadActivityImpl uploadActivity) {
    String taskQueue = ManagementFactory.getRuntimeMXBean().getName();
    Worker worker = factory.newWorker(taskQueue);
    worker.registerActivitiesImplementations(uploadActivity);
    return worker;
  }

and not using any specific worker/queue with the ActivityImpl annotation

@Component 
// This activity is run by hostSpecific task queue whose name is dynamic
// So do not add any ActivityImpl annotation
// @ActivityImpl(taskQueues = "some_queue")
public class UploadActivityImpl implements UploadActivity {
  @Autowired SomeAutowiredDependency someDependency;
....