package com.liao.service; import com.liao.grpc.UserGrpc; import com.liao.grpc.UserRequest; import com.liao.grpc.UserResponse; import io.grpc.Channel; import net.devh.springboot.autoconfigure.grpc.client.GrpcClient; import org.springframework.stereotype.Service; /** * @author liao * @date 2018...
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-autoconfigure</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><d...
<artifactId>grpc-client-spring-boot-autoconfigure</artifactId> <version>${grpc.starter.version}</version> </dependency> <dependency> <groupId>net.devh</groupId> <artifactId>grpc-server-spring-boot-starter</artifactId> <version>${grpc.starter.version}</version> </dependency> <dependency> <grou...
grpc-client-spring-boot-autoconfigure Rebase on master 1年前 grpc-client-spring-boot-starter Gradle and Protobuf Gradle Updates (#333) 5年前 grpc-common-spring-boot * Delete the Trace feature implemented by spring-cloud-starter-sleuth 1年前 grpc-server-spring-boot-autoconfigure Re...
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @EnableEurekaServer @SpringBootApplication public class CloudEurekaApplication { public static void main(String[] args) { ...
本文使用commons-pool2来实现连接池应用 1、定义一个产生连接池的工厂,需要继承BasePooledObjectFactory,其用处是生产和销毁连接池中保存的对象。根据需求,现在池子里保存的应该是grpc客户端对象。 GrpcClientFactory类: 2、连接池GrpcClient
package net.devh.boot.grpc.client.config; import java.io.File; import java.io.InputStream; import java.net.URI; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.List...
boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @EnableEurekaClient @EnableDiscoveryClient @SpringBootApplication public class CloudServerSideApplication { public static void main(...
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> <version>2.2.6.RELEASE</version> <scope>compile</scope> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-tcnative-boringssl-static</artifactId> ...
import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ServerStreamClientSideApplication { public static void main(String[] args) { SpringApplication.run(ServerStreamClientSideApplication.class, args); ...