blob: 3ded7c2e18515ac487ef0462144e56deb07a1fc9 [file] [log] [blame]
package org.apache.dubbo.admin.controller;
import org.apache.dubbo.admin.model.dto.ServiceTestDTO;
import org.apache.dubbo.admin.service.impl.GenericServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/{env}/test")
public class ServiceTestController {
@Autowired
private GenericServiceImpl genericService;
@RequestMapping(method = RequestMethod.POST)
public Object test(@PathVariable String env, @RequestBody ServiceTestDTO serviceTestDTO) {
return genericService.invoke(serviceTestDTO.getService(), serviceTestDTO.getMethod(), serviceTestDTO.getTypes(), null);
// return null;
}
}