I need to write some custom business logic that it requires to be executed before the application is deployed.
This custom business logic should re-use the existing business services together with JPA repository.
I don’t want to use Spring Hook to execute this logic. I want to create a standalone main program which can be triggered from command line. The reason why is not fine for me a Spring Hook because we want to be able to implement and run this kind of custom service during application is deployed as well.
Is there any library which I can reuse so I don’t need to implement: how we are calling the main program to be executed together with the SpringContext/DB Connect to be created for this main program?