I've got a Spring bean that is annotated with @Component. But I want to set/specify bean parameters. From what I can tell, my only option if I want to stick with annotations is to use an @Configuration class to specify the parameters when the bean is instantiated. However, in that case, I have to drop the @Component since it is up to the @Configuration class to declare the bean.
Essentially, using @Configuration and @Component would appear to be mutually exclusive. Similarly, declaring the bean in XML and annotating with @Component would be mutually exclusive as well.
I find it a little messy to have declarations in two possible places: the class itself (if annotated with @Component and not requiring any special initialization) and within a JavaConfig class. Am I the only one that sees it like this? Or is there a way to specify parameters while still using the @Comonent annotation?