This commit is contained in:
crusader 2018-04-25 16:22:46 +09:00
parent 7024141849
commit 6241a6502d

View File

@ -7,6 +7,7 @@ import com.loafle.overflow.core.exception.OverflowException;
import io.grpc.*;
import io.grpc.Status.Code;
import io.grpc.netty.NettyServerBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
@ -28,7 +29,7 @@ public class ServiceProxy {
ProxyServerInterceptor proxyServerInterceptor = new ProxyServerInterceptor();
server = ServerBuilder.forPort(port)
server = NettyServerBuilder.forPort(port)
.addService(ServerInterceptors.intercept(new ServiceImpl(new ServiceInvoker(ctx)), proxyServerInterceptor))
.build().start();
logger.info("Server started, listening on " + port);