val nettyRpcVersion = "0.0.1-SNAPSHOT"
repositories {
maven {
setUrl("https://maven.pkg.github.com/helloworlde/netty-rpc")
}
}
dependencies {
// 客户端
implementation("io.github.helloworlde:netty-rpc-spring-boot-starter-client:${nettyRpcVersion}")
// 服务端
implementation("io.github.helloworlde:netty-rpc-spring-boot-starter-server:${nettyRpcVersion}")
}
@NettyRpcService
@Slf4j
public class HelloServiceImpl implements HelloService {
// ...
}
@RestController
public class ExampleController {
@NettyRpcClient("netty-rpc-server")
private HelloService helloService;
// ...
}