Skip to content

Provide a pluggable abstraction for resolving SpringBootExceptionReporters #15955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wilkinsona opened this issue Feb 14, 2019 · 3 comments
Closed
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@wilkinsona
Copy link
Member

wilkinsona commented Feb 14, 2019

Currently, a SpringBootExceptionReporter is required to provide a constructor that takes a ConfigurableApplicationContext. This has two downsides:

  1. The constructor is required to take a context argument even if the context isn't needed.
  2. It makes it hard to replace the use of spring.factories with a pluggable, potentially non-reflective, mechanism (Allow other strategies than META-INF/spring.factories for configuring Spring Boot infrastructure #15704).

We should move to using ApplicationContextAware instead. It should be possible to do so without breaking any existing SpringBootExceptionReporter implementations (although I think it's unlikely that there are any outside of Boot itself).

@wilkinsona wilkinsona added the type: enhancement A general enhancement label Feb 14, 2019
@wilkinsona wilkinsona added this to the 2.2.x milestone Feb 14, 2019
@wilkinsona wilkinsona self-assigned this Feb 14, 2019
@wilkinsona wilkinsona added the for: team-attention An issue we'd like other members of the team to review label Feb 14, 2019
@wilkinsona wilkinsona removed the for: team-attention An issue we'd like other members of the team to review label Feb 22, 2019
@wilkinsona wilkinsona changed the title Use ApplicationContextAware to pass context into SpringBootExceptionReporters that need it Provide a pluggable abstraction for resolving SpringBootExceptionReporters Feb 22, 2019
@wilkinsona
Copy link
Member Author

We discussed this today and decided that we’d prefer to provide an abstraction that is specifically designed for resolving exception reporters.

@wilkinsona
Copy link
Member Author

It's not clear that the benefits on offer here justify the time it'll take to implement. The opportunity cost is too high at the moment.

@wilkinsona
Copy link
Member Author

The benefits remain unclear. Closing for now at least.

@wilkinsona wilkinsona removed this from the 2.x milestone May 4, 2022
@wilkinsona wilkinsona added the status: declined A suggestion or change that we don't feel we should currently apply label May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant