I have a class that requires parameters provided by the user at runtime. I do this because I like the idea of ensuring the object is always in a valid, ready to use state. However I do not know the parameter values until the user has started using the application which is causing problems with Spring IoC as everything is instantiated at start up.
I think I can work around it this with @Configuration, .getBean calls with arguments, and @Lazy annotations however it feels like I'm kluging (eg. .getBean calls are discouraged)
Is there a nicer way to handle this? I'm thinking I should just lump it and move to having a constructor with no parameters and force a setter method call with the parameters but then I'll have an object sitting around that's in an invalid state.