how to construct @service in Springboots using a payload variable
how to construct @service in Springboots using a payload variable I'm quite new in spring boots so I hope this is not a silly question I have a @Service that needs to initiate a class attribute, this attribute needs a information that comes from the RestPayload in the Controller. I'm not finding the most recommend way to do that. @RestController public class UserController { @Autowired private UserService userService; @RequestMapping("/searchUser") public List<UserWrapper> searchUser(@RequestBody UserWrapper userWrapper) { List<UserWrapper> returnUserWrapper = userService.findByName(userWrapper); return returnUserWrapper; } } And the service layer, I would like to be something like: @Service public class UserService { private LdapTemplate ldapTemplate; public static final String BASE_DN = "xxxxxxx"; @Value( value = "${sample.ldap.url}" ) private Str...