Skip to content

AbstractRefreshableApplicationContext should not appear in the type hierarchy of our application context implementations #16096

@snicoll

Description

@snicoll

Several ApplicationContext implementations we use inherits from AbstractRefreshableApplicationContext which is a hierarchy we shouldn't be using in modern-day arrangements:

  • AnnotationConfigWebApplicationContext
  • AnnotationConfigReactiveWebApplicationContext

While the latter is in our code base, the former is in the framework code base with no clear sign we shouldn't be using it anymore. Those contexts don't hold a BeanFactory instance before they refresh and therefore prevent any use of functional bean registration.

A potential replacement would be a GenericWebApplicationContext sub-class with a AnnotationConfigUtils.registerAnnotationConfigProcessors(ctx) invocation.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions