spring-framework / org.springframework.context.support / ApplicationObjectSupport / getApplicationContext

getApplicationContext

@Nullable fun getApplicationContext(): ApplicationContext

Return the ApplicationContext that this object is associated with.

Exceptions

IllegalStateException - if not running in an ApplicationContext