Skip to content

Develop - #33

Merged
TheWorthless11 merged 4 commits into
mainfrom
develop
Mar 27, 2026
Merged

Develop#33
TheWorthless11 merged 4 commits into
mainfrom
develop

Conversation

@TheWorthless11

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the admin bootstrap CommandLineRunner to be resilient in sliced Spring test contexts by making its dependencies optional via ObjectProvider, and updates the related integration test configuration accordingly.

Changes:

  • Refactored InventoryManagementApplication#initAdmin to accept ObjectProvider<UserRepository> and ObjectProvider<PasswordEncoder> and safely skip when beans are absent.
  • Updated AdminBootstrapRunnerIntegrationTest runner configuration to pass ObjectProvider dependencies into initAdmin.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/main/java/com/example/inventorymanagement/InventoryManagementApplication.java Makes admin bootstrap runner tolerate missing repository/encoder beans via ObjectProvider and early returns.
src/test/java/com/example/inventorymanagement/AdminBootstrapRunnerIntegrationTest.java Adjusts test wiring to match the new initAdmin signature using ObjectProvider.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TheWorthless11
TheWorthless11 merged commit 7e33226 into main Mar 27, 2026
2 checks passed
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