Annotations get you a long way in Solon. @Component, @Inject, @Bean cover the everyday work: declare a bean, wire it, done. But the moment you start writing a plugin, a framework extension, or anything that has to touch the container at runtime, you drop below the annotation layer. That layer is AppContext.

AppContext is the core component of Solon. It's where IoC/AOP actually lives, and it's the foundation the framework's hot-plug capability is built on. Its job is simple to state: manage the beans it holds, and register/apply the annotation processors that produce them. This post walks through the programmatic side of it, the API you reach for when annotations aren't enough.

Getting hold of an AppContext

There are three ways to get a reference, depending on where you are.

Global, from anywhere: