In Spring, it is easy to create ApplicationContext that uses only classes defined in a given package. How to achieve that in Micronaut?
I write:
ApplicationContext context =
ApplicationContext.builder()
.args(args)
.packages("org.kalamity.server")
.start();
context.getBean(MessageEventListener.class);
But beans from foreign packages are created and injected. I know, that Micronaut works on compile time, so it might be completely impossible.