Refactored Layers Architecture To Be A Spring Boot Application. Issue #2450
- Rebuilt the entire module to become a spring boot app .
- Changed the xml-based configuration to annotation-based. As such the
applicationContext.xmlfile is no more and with the autoconfiguration that comes with the annotation-based config, an application context is created and beans are automatically created by spring boot to be injected where needed. - Used Spring's constructor injection to pass around needed objects.
- Implemented
deleteAll()methods for theCakeBakingServiceImplto be used during testing. ThedeleteAll()methods, which are called before each tests using the@BeforeEachlifecycle annotation, was a way to adjust the tests in light of the singleton dependency injection of theCakeBakingServiceImplbean - Implemented a CommandLineRunner to run the spring boot app when app starts. That's where
initializeData()andcakeView.render()methods are called - And others.
🛠 Lift Auto-fix
Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.[^1]
# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/iluwatar/java-design-patterns/2469.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff
Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:
curl https://lift.sonatype.com/api/patch/github.com/iluwatar/java-design-patterns/2469.diff | git apply
Once you're satisfied, commit and push your changes in your project. [^1]: You can preview the patch by opening the patch URL in the browser.
@iluwatar sonarcloud's test coverage is a little bit too much. The tests in place should suffice
@iluwatar implemented the requests. you can have a look now
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Looks good! Thank you for the contribution 🎉
@all-contributors please add @JabezBrew for code
@iluwatar
I couldn't determine any contributions to add, did you specify any contributions? Please make sure to use valid contribution names.
I've put up a pull request to add @JabezBrew! :tada:







