ing
This commit is contained in:
parent
7024141849
commit
6241a6502d
|
@ -7,6 +7,7 @@ import com.loafle.overflow.core.exception.OverflowException;
|
||||||
|
|
||||||
import io.grpc.*;
|
import io.grpc.*;
|
||||||
import io.grpc.Status.Code;
|
import io.grpc.Status.Code;
|
||||||
|
import io.grpc.netty.NettyServerBuilder;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
|
@ -28,7 +29,7 @@ public class ServiceProxy {
|
||||||
|
|
||||||
ProxyServerInterceptor proxyServerInterceptor = new ProxyServerInterceptor();
|
ProxyServerInterceptor proxyServerInterceptor = new ProxyServerInterceptor();
|
||||||
|
|
||||||
server = ServerBuilder.forPort(port)
|
server = NettyServerBuilder.forPort(port)
|
||||||
.addService(ServerInterceptors.intercept(new ServiceImpl(new ServiceInvoker(ctx)), proxyServerInterceptor))
|
.addService(ServerInterceptors.intercept(new ServiceImpl(new ServiceInvoker(ctx)), proxyServerInterceptor))
|
||||||
.build().start();
|
.build().start();
|
||||||
logger.info("Server started, listening on " + port);
|
logger.info("Server started, listening on " + port);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user