1

我正在尝试使用播放框架和 grpc 设置测试项目。

我的build.sbt

enablePlugins(AkkaGrpcPlugin)

import play.grpc.gen.scaladsl.PlayScalaServerCodeGenerator
akkaGrpcExtraGenerators += PlayScalaServerCodeGenerator

libraryDependencies ++= Seq(
  "com.lightbend.play" %% "play-grpc-runtime" % "0.9.1"
) 

plugins.sbt

addSbtPlugin("com.lightbend.akka.grpc" % "sbt-akka-grpc" % "1.0.2")

resolvers += Resolver.bintrayRepo("playframework", "maven")

libraryDependencies += "com.lightbend.play" %% "play-grpc-generators" % "0.9.1"

原型:

syntax = "proto3";

package com.example.protos;

// The greeting service definition.
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (HelloReply) {}
}

// The request message containing the user's name.
message HelloRequest {
  string name = 1;
}

// The response message containing the greetings
message HelloReply {
  string message = 1;
}

现在根据文档:https ://developer.lightbend.com/docs/play-grpc/current/play/sumption-grpc.html这个设置也应该AkkaGrpcClientModule为我生成,但它不会发生。这是生成的工件列表:

AbstractGreeterRouter
DefaultGreeterClient
Greeter
GreeterClient
GreeterClientPowerApi
GreeterHandler$
HelloProto$
HelloReply
HelloRequest

我在设置中错过了什么吗?

4

1 回答 1

0

愚蠢的我,这不见了:

akkaGrpcExtraGenerators += PlayScalaClientCodeGenerator
于 2021-02-14T23:20:43.863 回答