All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.boot.dubbo.generic.DubboGenericController Maven / Gradle / Ivy

There is a newer version: 1.5.33
Show newest version
package com.alibaba.boot.dubbo.generic;

import com.fasterxml.jackson.databind.JsonNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.IOException;

/**
 * Created by wuyu on 2017/4/28.
 */
@RequestMapping(value = "${spring.dubbo.genericPrefix:/proxy}")
@ResponseBody
public class DubboGenericController {

    @Autowired
    private DubboGenericService dubboGenericProxyService;

    @RequestMapping(value = "/", method = {RequestMethod.POST, RequestMethod.DELETE, RequestMethod.PUT})
    public JsonNode proxy(@RequestBody GenericServiceConfig genericServiceConfig) throws IOException {
        return dubboGenericProxyService.proxy(genericServiceConfig);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy