
org.nofdev.servicefacade.BatchController.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of service-host-mvc Show documentation
Show all versions of service-host-mvc Show documentation
The server side componet of Nofdev RPC framework
The newest version!
package org.nofdev.servicefacade
import com.fasterxml.jackson.core.JsonProcessingException
import com.fasterxml.jackson.databind.JavaType
import com.fasterxml.jackson.databind.ObjectMapper
import groovy.transform.CompileStatic
import org.nofdev.exception.BatchException
import org.nofdev.logging.CustomLogger
import org.springframework.aop.framework.AopProxyUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.ApplicationContext
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.stereotype.Service
import org.springframework.util.ReflectionUtils
import org.springframework.web.bind.annotation.*
import java.lang.reflect.Method
import java.lang.reflect.Type
import java.util.concurrent.CompletableFuture
import java.util.stream.Collectors
/**
* Created by Liutengfei on 2016/7/19 0019.
*/
@RestController
@RequestMapping("/batch")
@CompileStatic
class BatchController {
private static final CustomLogger log = CustomLogger.getLogger(BatchController.class);
@Autowired
private ObjectMapper objectMapper
@Autowired
private ExceptionSettings exceptionSettings;
@Autowired
private ApplicationContext context;
@Autowired(required = false)
private Authentication authentication;
@RequestMapping("json/{packageName}/{interfaceName}/{methodName}")
public ResponseEntity json(@PathVariable String packageName,
@PathVariable String interfaceName,
@PathVariable String methodName,
@RequestParam(value = "params", required = false) String[] params,
@RequestHeader(required = false) Map header) {
def serviceContext = ServiceContextHolder.serviceContext
HttpJsonResponse
© 2015 - 2025 Weber Informatics LLC | Privacy Policy