How to use LambdaMetaFactory in REST API of Springboot?

36 views Asked by At

I'm trying to use LambdaMetaFactory in a simple Springboot API as mentioned below. I'm trying to invoke both fetchUser and findUser methods of controller and service layer and fetch the execution time of these methods using LambdaMetaFactory.

UserController:

    @Autowired
    UserService userService;

    @GetMapping("/fetchUser")
    public String fetchUser(){
    return userService.findUser();
   }

UserService:

 public String findUser(){ 
    return userName = "XYZ";
   }

Can anyone please suggest me the usage of LambdaMetaFactory for each method invocation in Springboot API ? Is this possible ?

0

There are 0 answers