1

I started to learn Spring recently and I want to know if it's possible to "select" a component based on user input.

Example: I have a user interface that lets you select your gender: Male or Female. Is it possible to to "inject" the option selected by the user?

Sorry if I did not use the correct terminology... I'm still new to this.

Hidder
  • 11
  • 1
  • yes, you can use Factory Pattern or implement Custom Condition. Please refer to the link https://stackoverflow.com/questions/34350865/spring-choose-bean-implementation-at-runtime if it helps. – dassum Nov 08 '19 at 17:50
  • Thank you. Not sure if I get it... but I'll do my best :) – Hidder Nov 08 '19 at 18:13

0 Answers0