Make sample run OOTB with 2 ports

This commit is contained in:
Dave Syer
2025-01-22 07:55:38 +00:00
parent c7b1ed3684
commit 8219e26c1e
2 changed files with 3 additions and 2 deletions

View File

@@ -1 +1,2 @@
spring.application.name=grpc-server
spring.grpc.server.reactive.enabled=false

View File

@@ -19,14 +19,14 @@ import org.springframework.grpc.sample.proto.SimpleGrpc;
import org.springframework.grpc.test.LocalGrpcPort;
import org.springframework.test.annotation.DirtiesContext;
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.grpc.server.reactive.enabled=false")
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class GrpcServerApplicationTests {
private static Log log = LogFactory.getLog(GrpcServerApplicationTests.class);
public static void main(String[] args) {
new SpringApplicationBuilder(GrpcServerApplication.class, ExtraConfiguration.class)
.run("--spring.grpc.server.reactive.enabled=false");
.run(args);
}
@Autowired