I am trying to invoke REST APIs in the controller layer using command line inputs from the user using a Spring Boot application. I am aware of CommandLineRunner interface. But according to my knowledge it can be used to run some code which needs to be run at the start of the application for once. But for my case when ever user input some command line values different REST APIs written in the controller layer should be invoked. Is this possible in a Spring Boot application?
eg -
user input - add 2 3
add 2 3 command should invoke the following api in the controller layer
controller layer
@RequestMapping("/add")
public int addNumber(@RequestBody SomeEntity entityObj) {
//
}