Trying to register beans dynamically via SpringApplicationBuilder class and it\'s working when running the app, but when trying to