Hello guys,
I'm trying to use AnnotationConfigApplicationContext within the following scenario:
Where ApiConfig.class is in the thread ClassLoader:Code:AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); ctx.setClassLoader(this.getClass().getClassLoader()); // Changes here to take ProcessConfig ctx.register(ProcessConfig.class); ctx.register(ApiConfig.class); // Exception here ctx.refresh();
Thread.currentThread().getContextClassLoader();
Is there any configuration that could be made for AnnotationConfigApplicationContext allowing it to consider both classLoaders?
Thank you


Reply With Quote