Skip to content

Conversation

@joshuakudo
Copy link
Collaborator

No description provided.

@joshuakudo joshuakudo requested a review from mahikgot September 28, 2025 06:28
Copy link
Collaborator

Choose a reason for hiding this comment

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

StorageService is a generic component that should not be exposed to implementation details. The existing ObjectStore is already the parent class of the new GCPObjectStore.

What you need to do is create another StorageService bean and use it in non dev controllers.

So you would have devStorageService and storageService beans. One would use LocalObjectStore and the other would use GCPObjectStore, both of these are implementations of the ObjectStore class. So you would need no changes in the dependencies of the StorageService class.

And you would use each in the different storageControllers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

3 controllers???
devcontroller, storagecontroller, gcpcontroller (will change it to ProdStorageController)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe just create multiple ObjectStore beans for the different profiles and make spring insert them into the single storageService bean

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