Commit Graph

87 Commits

Author SHA1 Message Date
mackey0225
cfb14ba7e0 Fix typo in docs
Signed-off-by: mackey0225 <masaki.asano0225@gmail.com>
2025-03-24 08:31:38 +00:00
Dave Syer
ff1b8e3dfa Clarify section indents 2025-03-13 12:27:06 +00:00
Dave Syer
fe2509d1ac Revert to snapshots 2025-03-10 10:25:10 +00:00
Dave Syer
630e776158 Bump to 0.5.0 2025-03-10 09:09:29 +00:00
Chris Bono
454f0b832d Extract Boot managed deps. from spring-grpc-dependencies
This extracts the Spring Boot managed dependencies from
the spring-grpc-dependencies BOM module into a new
module (`spring-grpc-build-dependencies`) that includes
the dependencies from the BOM as well as the Spring
Boot managed dependencies.

Resolves #118

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-03-10 08:39:51 +00:00
Dave Syer
d8995bb59a Add support for @EnableGrpcClients
Automatic bean definition registration for stubs

Fixes #91
2025-03-07 08:56:30 +00:00
Chris Bono
ba5ab90807 Add Spring Boot 3.5.x support to README
Resolves #121

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-03-04 08:22:37 +00:00
Dave Syer
b423429b8f Revert to snapshot 2025-03-03 12:47:03 +00:00
Dave Syer
28a2c58f78 Bump to 0.4.0
There are some version management issues with 0.3.0 so we
need a release to catch up with changes in Boot.
2025-03-03 09:45:48 +00:00
Chris Bono
b04b6ca1ac Add ConditionalOnGrpcServerEnabled flag
This adds a coarse-grained conditional guard that will disable the
server autoconfiguration if `spring.grpc.server.enabled` is set to
false or `BindableService` class is not available on the classpath.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-24 12:42:06 +00:00
Chris Bono
2790a8a027 Add ConditionalOnGrpcClientEnabled flag
This adds a coarse-grained conditional guard that will disable the
client autoconfiguration if `spring.grpc.client.enabled` is set to
false or the `io.grpc:grpc-stub` module is not on the classpath.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-24 12:42:06 +00:00
Chris Bono
c3b7d77e41 Update description for servlet server config prop
Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
ba4427b1ae Update whats-new.adoc with fine-grained starters
Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
4c1ee098f9 Add servlet server starter module
This adds a starter module that includes the Spring gRPC server
starter and the required dependencies ((`spring-boot-starter-web`
and `jakarta-grpc-servlet`) to use the servlet container as a
gRPC server.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
2bd167e985 Add client starter module
This adds a starter module that includes the Spring gRPC
core module and the grpc-stub dependency.

Also, makes the `grpc-stub` dependency optional in Spring
gRPC core module.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
f398c85ac0 Rename security csrf property to include 'server'
This renames the `spring.grpc.security.csrf.enabled` property
to `spring.grpc.server.security.csrf.enabled` to signal that
it is a server configuration property.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 06:23:40 +00:00
Chris Bono
9a970cafa5 Adds missing config props metadata
This adds the following entries to additional-spring-configuration-metadata.json:

- `spring.grpc.security.csrf.enabled`
- `spring.grpc.server.servlet.enabled`

They are not present in first class `@ConfigurationProperties` so need to be
manually added.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 06:23:40 +00:00
Dave Syer
7003b13f23 Correct getting started guide 2025-01-31 11:10:16 +00:00
Dave Syer
ba91758dac Mention annotation as well 2025-01-29 17:08:17 +00:00
Andrey Litvitski
ae8acc52cd Fix documentation on testing server application 2025-01-28 13:37:47 +00:00
Dave Syer
c13369e6db Add some oauth2 configuration and sample code 2025-01-28 09:00:48 +00:00
Dave Syer
3ac7569d5c Add authorizeRequests() example 2025-01-24 13:10:20 +00:00
Dave Syer
be643c3627 Disable CSRF for Servlet apps by default 2025-01-24 09:06:04 +00:00
Chris Bono
495d14b48d Fix getting-started.adoc steps
Updates the fix-getting-started.adoc section of the reference
guide to remove the requirement of the "web" and "graalvm"
dependencies as the former requires other information besides
dependencies to work properly and the latter is just complication
that is not needed for a simple quick start.

See #97
2025-01-21 06:18:45 +00:00
Dave Syer
ec190ae74d Change indents 2025-01-16 09:34:35 +00:00
Dave Syer
4779cae338 Add note on local.grpc.port 2025-01-15 09:20:44 +00:00
Dave Syer
4efd23aa4e Revert to snapshots and add whats new 2025-01-15 09:07:25 +00:00
Dave Syer
406532e44e Bump to 0.3.0 for release 2025-01-15 08:46:48 +00:00
Chris Bono
87e26c378e Move named channel back into autoconfigure module
This commit moves the channel config ("NamedChannel") back to
autoconfigure module as the effort to move to core turns out to
be more trouble than it is worth at this time.

Fixes #92
2025-01-13 08:18:11 +00:00
Chris Bono
fc1de937a8 Polish "Update broken code examples in docs"
This continues the effort of the previous commit to update
broken code examples.
2025-01-12 12:14:51 -06:00
Dumildes Paulo
b861d9301b Update broken code example in docs
This commit updates a broken code example in the docs.
The breakage was introduced in commit b08e11a.
2025-01-12 12:08:04 -06:00
Dave Syer
4c4bcb4643 Add some docs on security configuration 2025-01-08 09:50:56 +00:00
Chris Bono
c936d6a876 Move NamedChannel model to core module (#89)
This commit introduces the NamedChannelRegistry which allows
moving the NamedChannel model to the core package and decouples
it from the client properties.
2025-01-06 21:19:07 -06:00
Dave Syer
f8c6070eaa Upgrade Spring Boot to latest 2025-01-06 11:23:52 +00:00
Chris Bono
b08e11ad39 Improve channel factory API
This commit improves the GrpcChannelFactory createChannel API by
introducing `ChannelBuilderOptions` that can be specified during
channel creation.

Additionally, concrete Netty channel factory implementations have
been added as well as adding type to the GrpcChannelBuilderCustomizer
which helps match customizers to channel factories.
2025-01-03 22:04:28 +00:00
Dave Syer
b3271be918 Add explicit support for running on separate port
If the user wants a second port for gRPC that should be possible
(and was the only way with the old ecosystem projects). This change
adds a webflux sample and support for
spring.grpc.server.{servlet,reactive}.enabled to be explicitly
"false" to disable the embedded services.

N.B. embedded services are not yet supported in webflux so the flag
has no effect, except to disable gRPC completely if it is "true".
2024-12-23 15:02:45 +00:00
Dave Syer
8b91ebd86a Tidy up README 2024-12-20 14:40:34 +00:00
Josh Long
780f8e61ea Add more detailed getting started to readme 2024-12-20 14:30:49 +00:00
Jonas Bjørge Andersen
4149ed552e Add autoconfiguration for client side observation interceptor
[resolves #51]

Signed-off-by: Jonas Bjørge Andersen <dev@jonasandersen.no>
2024-12-20 08:00:47 +00:00
Chris Bono
a21748aba2 Add autoconfiguration guard on GrpcServlet
This commit adds a guard on the Servlet gRPC server auto-configuration
to ensure that the `io.grpc:grpc-servlet-jakarta` lib is on the classpath.

Resolves #83

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-12-20 07:22:09 +00:00
Dave Syer
e63ed35edf Upgrade to Spring Boot 3.4.0 2024-12-16 11:20:53 +00:00
Chris Bono
9dbe763932 Fix config props defaults and descriptions
This commit simplifies the client properties by setting the default values
directly on the properties and removes markdown from the property javadocs.
This improves end user experience by adding default values and descriptions
to the generated config props docs.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-12-05 06:51:19 +00:00
Dave Syer
acbe334b7e Refine config properties for default channel
Because of https://github.com/spring-projects/spring-boot/issues/43352
there's no point having a "default" entry in the channels map.
2024-12-04 09:56:39 +00:00
Chris Bono
5c0ca7056c Add client interceptors to channel factory
This commit adds support for global and channel-specific client
interceptors.

Resolves #52

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-12-01 21:01:08 +00:00
Chris Bono
62499c8be2 Rename client configurer to customizer
This commit renames the GrpcChannelConfigurer to GrpcChannelBuilderCustomizer
to more accurately represent its purpose and for consistency with the
server-side terminology.

Additionally, a new `What's new?` doc is added to list breaking changes between
versions.

See #52

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-12-01 17:57:41 +00:00
Dave Syer
7f4cac0381 Back to snapshots 2024-11-28 15:37:42 +00:00
Dave Syer
b273d8e83a Bump to 0.2.0 2024-11-28 14:30:09 +00:00
Chris Bono
e0199dd130 Add client side health feature
This commit adds health auto-configuration to the client.

See #66

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-28 10:53:03 +00:00
Chris Bono
9374bdf93f Add docs for health feature
This commit adds docs for the server-side portion of the health feature.

See #56

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-26 17:28:41 +00:00
Chris Bono
6e154d53eb Add actuator health check adapter
This commit adds the implementation to the previously added skeleton
ActuatorHealthAdapter. On a configurable schedule, the adapter takes
a configured list of Actuator health indicators and gets their current
status and maps it into the gRPC HealthStatusManager.

See #56

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2024-11-25 07:47:57 +00:00