Skip to content
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

Consider moving post processor implementation outside of @Configuration #980

Open
snicoll opened this issue Dec 19, 2020 · 1 comment
Open

Comments

@snicoll
Copy link

snicoll commented Dec 19, 2020

A user has drawn our attention that a code example shows a @Configuration class that implements BeanPostProcessor (Configurator).

It's really unusual to have a @Configuration class implements additional contracts as its main purpose is to define beans in the context using @Bean annotated factory methods.

Can you please consider moving that to a dedicated component?

@sbordet
Copy link
Member

sbordet commented Dec 19, 2020

It's really unusual to have a @configuration class implements additional contracts as its main purpose is to define beans in the context using @bean annotated factory methods.

"Unusual" has a too wide range of interpretations 😃

Is this documented somewhere?

Furthermore, I'm all ears for a suggested solution -- PR or example to follow would be great.

The only solution that comes to my mind is to complicate things with more classes and beans and factory methods for no good reasons than to please Spring and workaround a Spring bug?
Does not sound right to impose this burden on application developers, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants