File tree Expand file tree Collapse file tree 5 files changed +12
-15
lines changed
samples/grpc-server-kotlin
kotlin/org/springframework/grpc/sample Expand file tree Collapse file tree 5 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ dependencies {
3535
3636 implementation ' org.springframework.grpc:spring-grpc-spring-boot-starter'
3737 implementation ' org.springframework.boot:spring-boot-starter-actuator'
38+ implementation(" io.micrometer:context-propagation:1.2.0" )
39+ implementation ' io.grpc:grpc-services'
40+ implementation " io.grpc:grpc-kotlin-stub:${ kotlinStubVersion} "
41+
3842 implementation " org.jetbrains.kotlin:kotlin-reflect"
3943 implementation ' org.jetbrains.kotlinx:kotlinx-coroutines-core'
4044 implementation " io.grpc:grpc-kotlin-stub:${ kotlinStubVersion} "
Original file line number Diff line number Diff line change 7575 <artifactId >spring-boot-starter-test</artifactId >
7676 <scope >test</scope >
7777 </dependency >
78+ <dependency >
79+ <groupId >io.micrometer</groupId >
80+ <artifactId >context-propagation</artifactId >
81+ <version >1.2.0</version >
82+ </dependency >
83+
7884 <dependency >
7985 <!-- for testing unix domain sockets -->
8086 <groupId >io.netty</groupId >
Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ import org.springframework.test.annotation.DirtiesContext
1717 " spring.grpc.server.port=0" ,
1818 " spring.grpc.client.default-channel.address=0.0.0.0:\$ {local.grpc.port}"
1919 ],
20- useMainMethod = UseMainMethod .ALWAYS
2120)
2221@DirtiesContext
2322class GrpcServerApplicationTests {
2423
24+ private val log: Log = LogFactory .getLog(this .javaClass)
25+
2526 @Autowired
2627 private lateinit var stub: SimpleBlockingStub
2728
@@ -39,13 +40,4 @@ class GrpcServerApplicationTests {
3940 )
4041 Assertions .assertEquals(" Hello ==> Alien" , response.getMessage())
4142 }
42-
43- companion object {
44- private val log: Log = LogFactory .getLog(GrpcServerApplicationTests ::class .java)
45-
46- @JvmStatic
47- fun main (args : Array <String >) {
48- SpringApplicationBuilder (GrpcServerApplication ::class .java).run ()
49- }
50- }
5143}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments