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

Replace @PostConstruct with InitializingBean #28

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

genuss
Copy link
Contributor

@genuss genuss commented Feb 26, 2023

Spring boot 3 upgraded from javax.* to jakarta.* classes for EE support. And if in a spring boot application there will be no old javax.* dependency, the @PostConstruct annotated methods won't be invoked.
This small change allows init method to work in both spring boot 2 and 3 (and even spring boot 1.x 😄 )
What do you think?

… will be invoked in both spring boot 2 and 3
Copy link
Owner

@Fadelis Fadelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I don't mind this.

@Fadelis Fadelis merged commit 345690e into Fadelis:master Feb 26, 2023
@genuss genuss deleted the feature/post-construct branch February 26, 2023 12:53
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

Successfully merging this pull request may close these issues.

2 participants