My goal was - for testing - to get a bean from the Spring AppliciationContext. The class of my bean is 'MyBean':
ConfigurableApplicationContext context = SpringApplication.run(Service.class, args); MyBean myBean = context.getBean(MyBean.class);
My goal was - for testing - to get a bean from the Spring AppliciationContext. The class of my bean is 'MyBean':
ConfigurableApplicationContext context = SpringApplication.run(Service.class, args); MyBean myBean = context.getBean(MyBean.class);
Add new comment