Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling the server for actual application #445

Closed
andrewlandfried opened this issue Oct 30, 2020 · 2 comments
Closed

Disabling the server for actual application #445

andrewlandfried opened this issue Oct 30, 2020 · 2 comments
Labels
feedback required Information are missing or feedback for suggestions is requested question A question about this library or its usage

Comments

@andrewlandfried
Copy link

The context

I have the server dependencies included in my project because I want to make some mock servers for some integration tests. However, in my actual application, I only need the client.

The question

When I start my application, I notice this log line:
method=createAndStartGrpcServer line=91 - gRPC Server started, listening on address: *, port: 9090

Is there a way to disable the server? I didn't see too much about the actual configuration properties in the documentation other than being able to change the port.

The application's environment

Which versions do you use?

  • Spring (boot): 2.3.4
  • grpc-java: 1.31.1
  • grpc-spring-boot-starter: 2.10.1.LATEST
  • java: version + architecture (64bit?) 64 bit java 11
  • Other relevant libraries...
@andrewlandfried andrewlandfried added the question A question about this library or its usage label Oct 30, 2020
@ST-DDT
Copy link
Collaborator

ST-DDT commented Oct 30, 2020

How about using the server part as a test dependency? (alternatively as provided/compileOnly/optional dependency)

Is there a way to disable the server? I didn't see too much about the actual configuration properties in the documentation other than being able to change the port.

Use -1 to disable it.

https://github.com/yidongnan/grpc-spring-boot-starter/blob/aa286ab3e4c78899f77a9872b1a275a51ca4733f/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/config/GrpcServerProperties.java#L78-L86

Does that answer your question?

@ST-DDT ST-DDT added the feedback required Information are missing or feedback for suggestions is requested label Oct 30, 2020
@asarkar
Copy link

asarkar commented Nov 14, 2020

I believe https://github.com/yidongnan/grpc-spring-boot-starter/issues/419 talks about the same problem, and a solution was discussed. This ticket can be closed a dup in favor in 419.

@ST-DDT ST-DDT closed this as completed Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback required Information are missing or feedback for suggestions is requested question A question about this library or its usage
Projects
None yet
Development

No branches or pull requests

3 participants