Commit Graph

96 Commits

Author SHA1 Message Date
Dave Syer
b16ec9cf24 Ensure global interceptors are added to Servlet
Builds on #42 and #1.
2024-11-11 11:34:31 +00:00
Dave Syer
c6cbfe1f17 Module name 2024-11-10 21:50:05 +00:00
Andrey Litvitski
50e2db6d8a Update JavaDocs for grpc-client classes 2024-11-10 13:45:28 +00:00
CyberZujo
d61af1a1a2 Add autoconfig for reflection service and friends #26
Signed-off-by: CyberZujo <hara_zujo@hotmail.com>
2024-11-09 11:36:52 +00:00
Dave Syer
ee994e0f4d Use new annotation for existing interceptor 2024-11-07 12:16:10 +00:00
Dave Syer
d630a41988 Tweak server docs on servlet customizations 2024-11-07 08:49:15 +00:00
Chris Bono
4daf41392a Add GlobalServerInterceptor to service discovery
This commit builds upon the previously added service discoverer
by adding support for finding all server interceptor beans that
are marked w/ the newly added `@GlobalServerInterceptor`
annotation.

Resolves #4

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-07 08:10:05 +00:00
Chris Bono
daf8e046c3 Adds checkstyles to project
This commit configures in the Puppycrawl checkstyle with the Spring JavaFormat.

To avoid the intrusive nature of such a change, the spring-grpc-core module is
the only one to have the checkstyles applied. I will handle the other modules as
time permits.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-07 08:07:48 +00:00
Dave Syer
33483bb500 Revert ServerServiceDefinition bean provider
In retrospect I think users should not have to create
ServerServiceDefinitions. It doesn't help anybody and
it seems like quite a deep internal detail.
2024-11-06 17:14:59 +00:00
Dave Syer
80e703448c FIx link in docs 2024-11-06 15:29:27 +00:00
Dave Syer
f0ec4b1bac Add support for registering service definition bean 2024-11-06 11:51:29 +00:00
Chris Bono
7fed50a420 Polish "Auto-configure Micrometer Observations"
- Add name attribute to ConditionalOnProperty
- Add autconfig to imports file
- Add a few tests to cover the other autoconfig conditonals

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-06 01:47:11 -06:00
Sunny
61b1323440 Auto-configure Micrometer Observations
This commit auto-configures in the Micrometer Observations
API and its Observation server interceptor.

Resolves #1

Signed-off-by: Sunny <hmtang@gmail.com>
2024-11-06 01:47:11 -06:00
Dave Syer
c56784fd7b Remove netty-specific credentials factory in client
See also #10
2024-11-05 15:39:30 +00:00
Dave Syer
158e779f61 Unused imports 2024-11-05 15:28:03 +00:00
Dave Syer
8491d2641b Remove netty specific channel factories 2024-11-05 13:51:32 +00:00
Dave Syer
05e6240672 Support for mTLS in client
Fixes #10
2024-11-05 12:28:22 +00:00
Dave Syer
148e1d1e23 Add client auth enum to ssl configuration 2024-11-05 07:34:42 +00:00
Dave Syer
d24e80aedd Move codec server config to a central location
There was no need for the duplication of netty and shaded netty
when the builder is generic anyway.
2024-11-05 07:33:18 +00:00
Chris Bono
9cf0227354 Add GrpcServiceDiscoverer to prepare for interceptors
This commit re-introduces the service discoverer concept from the
gRPC ecosystem. We previously removed it but realized that the
abstraction is helpful to provide fully configured service
definitions with features like server interceptors. The next
commit will take advantage of this commit to add interceptors.

See #4

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-04 08:45:23 +00:00
Chris Bono
1397632f03 Polish "Allow GrpcServlet to be configured"
* Re-order imports (we need to add the checkstyle rules to keep these consistent)
* Remove implied comment in auto-configuration
2024-10-28 13:34:50 -05:00
Toshiaki Maki
7da1e80b55 Allow GrpcServlet to be configured
This adds the ability to apply `ServerBuilderCustomizer` customizers
and `spring.grpc.server.max-inbound-message-size` property to
`GrpcServlet`.

Signed-off-by: Toshiaki Maki <makingx@gmail.com>
2024-10-28 13:30:40 -05:00
Logan Kulinski
5ab408b626 chris.bono@gmail.com
Signed-off-by: Logan Kulinski <rashes_lineage02@icloud.com>
2024-10-27 12:10:51 -05:00
Dave Syer
8bab3cd081 Revert to snapshots 2024-10-25 12:35:52 +01:00
Dave Syer
170ac67a13 Fix poms for release 2024-10-25 12:35:34 +01:00
Dave Syer
2d2e0d8b8e Ready for 0.1.0 2024-10-25 12:20:47 +01:00
Dave Syer
2eaaa8f805 Ensure server factory is not created in client 2024-10-25 12:15:54 +01:00
Dave Syer
42b54708aa Add sample with Shaded Netty 2024-10-25 12:10:57 +01:00
Dave Syer
6be591d544 Add some basic docs 2024-10-25 11:01:54 +01:00
Dave Syer
b5a623231a Add a test for autoconfig of servlet
Signed-off-by: Dave Syer <dsyer@vmware.com>
2024-10-24 08:38:12 +01:00
Dave Syer
c358f6ef4d Move GrpcServlet to autoconfiguration
Signed-off-by: Dave Syer <dsyer@vmware.com>
2024-10-23 11:26:34 +01:00
Dave Syer
1997593755 Add tomcat sample (no autoconfig)
Signed-off-by: Dave Syer <dsyer@vmware.com>
2024-10-23 11:26:16 +01:00
Dave Syer
24a797ee4b Reinstate flatten plugin
The problem with the flatten plugin is that it unconditionally
nukes the dependency management section, which we very much need
in our "dependencies" modules.

The key is to make the "dependencies" pom independent of the main
reactor (pattern copied form Spring Cloud). Then you can run
flatten in the main reactor build and not in the dependencies,
which then retain there useful properties and dependency
management.
2024-10-22 11:17:53 +01:00
Dave Syer
0b98da4c49 Install nodejs independently of antora 2024-10-22 10:07:02 +01:00
Dave Syer
4712ca5458 Add CONTRIBUTING.md 2024-10-22 09:50:08 +01:00
Dave Syer
951dd83e51 Add automation for README.md generation at top level
Fixes #35
2024-10-22 09:27:57 +01:00
Dave Syer
3025853b31 Autogenerate README 2024-10-21 16:37:47 +01:00
Dave Syer
fe2f266d87 Add PR notes to contributing docs 2024-10-21 16:32:58 +01:00
varunu28
434e26dcec Rename bom to dependencies 2024-10-21 09:41:42 +01:00
Chris Bono
213d1f9bd8 Add spring-grpc-spring-boot-starter module
This commit does the following:

* Adds a `spring-grpc-spring-boot-starter` module

* Adjusts the scope of the dependencies in the`spring-grpc-spring-boot-autoconfigure`
  module to optional
2024-10-21 08:30:54 +01:00
Chris Bono
40fed814b9 Exclude older protobuf lib from grpc lib
This commit excludes the older protobuf libs
`protobuf-java` and `proto-google-common-protos` from the
`grpc-protobuf` lib and then explicitly adds back in the
dependencies at the desired version in the root pom.xml
2024-10-21 08:30:40 +01:00
Chris Bono
f31d6ad6f7 Remove dependency on javax.annotation
This commit removes the directy dependency that was required
by the protoc compiler for our samples. The Maven and Gradle
now support an option to use an internal annotation which then
allows us to remove the deprecated javax.annotation dependency.

Background here: https://github.com/grpc/grpc-java/pull/10927
2024-10-20 21:09:13 +01:00
Chris Bono
c856f71159 Clean up dependencies and versions
This commit does the following:

- Update various dependencies to latest patch versions
- Remove unused dependencies
- Remove unused version properties
- Remove Spring Boot references in all modules except autoconfigure
  and samples
2024-10-20 21:09:13 +01:00
andreilisa
118e176daf #8: Codec support 2024-10-20 20:14:02 +01:00
Chris Bono
c07d4defe2 Add additional config props metadata file (#33)
This commit adds the additional-spring-configuration-metadata.json
file to the autoconfigure module so that we can add default values
for properties whose defaults can not be determined.
2024-10-19 22:23:07 -05:00
Dave Syer
3cb6ce3912 Move code around so factory gets address not port 2024-10-19 07:52:50 +01:00
Dave Syer
85de440e50 Use dependency management plugin to resolve versions 2024-10-17 11:46:31 +01:00
Dave Syer
e9298a3f06 Add Gradle configuration for sample 2024-10-16 13:54:11 +01:00
Dave Syer
f0a84cec5d Sack the flatten plugin, at least till it works 2024-10-16 13:02:45 +01:00
Dave Syer
9b89bf2b21 Add basic getting started guide to README 2024-10-16 11:10:12 +01:00