Skip to content

Refactor MessageService to Use Spring Dependency Injection #4983

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

snowvirus
Copy link

@snowvirus snowvirus commented Mar 26, 2025

TRUNK-4988: Refactor MessageService to Use Spring Dependency Injection

Description of what I changed

Implemented the configureMessageService(MessageSender, MessagePreparator) method to configure MessageService using Spring’s Dependency Injection.

Updated getMessageService() to rely on Spring DI and removed the manual setting of dependencies.

Refactored MessageService initialization for cleaner, more maintainable code that follows DI principles.

Added a unit test to verify that the configureMessageService() method works as expected.

Issue I worked on

see This

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

  • I have added tests to cover my changes. (If you refactored
    existing code that was well tested you do not have to add tests)

  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.

  • All new and existing tests passed.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master
    Screenshot from 2025-03-26 21-23-56

@snowvirus
Copy link
Author

am requesting for a review
@dkayiwa @ibacher

@snowvirus
Copy link
Author

@dkayiwa help me review my PR

@snowvirus
Copy link
Author

@dkayiwa @ibacher any review. or am missing some things

@snowvirus
Copy link
Author

@dkayiwa @ibacher any review?

@snowvirus
Copy link
Author

ok, @dkayiwa @ibacher did i do the PR in a wrong?

@snowvirus
Copy link
Author

A review please
@dkayiwa @ibacher

@snowvirus
Copy link
Author

@dkayiwa @ibacher .
Any review please.

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