Commit Graph

256 Commits

Author SHA1 Message Date
Dave Syer
55bd93958a Rename client annotations 2025-03-26 08:23:11 +00:00
Dave Syer
6bb10ab65e Add a test and check for direct onErrorMap 2025-03-26 08:19:41 +00:00
Dave Syer
5d1b0e78fc Add a test and check for direct onErrorMap 2025-03-26 08:18:38 +00:00
Dave Syer
e468136a64 Remove redundant address configuration 2025-03-25 17:43:49 +00:00
Dave Syer
582b59a7a6 Add registrar to autoconfig 2025-03-25 07:11:24 +00:00
Dave Syer
fce479bc36 Add a bean post processor for reactive stubs
Fixes gh-143
2025-03-25 06:57:12 +00:00
Dave Syer
e4fa0f83df Check if csrf protection is already disabled
If the user has explicitly disabled CSRF protection in a custom
SecurityFilterChain, we should be able to back off and not try
to disable it just for the gRPC endpoints (accidentally switching
it back on for the other endpoints).

Fixes gh-142
2025-03-24 10:09:43 +00:00
mackey0225
cfb14ba7e0 Fix typo in docs
Signed-off-by: mackey0225 <masaki.asano0225@gmail.com>
2025-03-24 08:31:38 +00:00
Eric
c0b8b630eb Make maven tree display more friendly
Signed-off-by: Eric <cs.liaow@gmail.com>
2025-03-24 08:30:56 +00:00
Dave Syer
6198fe04d8 Add reactive version of servlet request matchers 2025-03-18 14:56:06 +00:00
Dave Syer
3a3807ed0e No need for duplicate bean names 2025-03-13 12:43:01 +00:00
Dave Syer
fc2e90f3b9 Remove redundant @GrpcClients 2025-03-13 12:38:50 +00:00
Sergei Batsura
b004ba6559 Added defaultDeadline client property
Signed-off-by: Sergei Batsura <batsura.sa@gmail.com>
[resolves #136]
2025-03-13 12:36:20 +00:00
Dave Syer
ff1b8e3dfa Clarify section indents 2025-03-13 12:27:06 +00:00
Dave Syer
6b12a27d2e Harmonize grpc versions 2025-03-10 17:52:57 +00:00
Andrey Litvitski
ec9eb13004 Add AOT integration test
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-03-10 12:26:34 -05:00
Dave Syer
e71bdcf8a9 Add OAuth2 sample to Gradle build 2025-03-10 16:51:33 +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
Dave Syer
b8ff6eae22 Fix versions 2025-03-10 08:58:52 +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
Dave Syer
f580197169 Fix bugs in security autoconfig conditions 2025-03-06 14:52:20 +00:00
Dave Syer
2578d99cd3 Harmonize plugin versions 2025-03-05 14:43:20 +00:00
Chris Bono
2464944f6e Fix docs.yml workflow (add 'package' command)
The recent move to do config props generation only at docs
generation time left the docs.yml broken as it requires the
config props generator class to be compiled prior to running.

This updates the './build-docs.sh' to include the package command
as well as update the docs.yml to use the same script.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-03-04 08:23:49 +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
Chris Bono
0720cb25cb Add Spring Boot compatability check workflow
Adds a GHA workflow to check Spring Boot compatability of the framework.

The workflow exercises the samples and dynamically sets the version of
each samples Spring Boot plugin.

We do the dynamic version setting using the power of Gradle init scripts
and the fact that each of the samples is exposed as a Gradle module.
Doing this has a positive side effect that our samples are kept up to date
for both Maven and Gradle.

Reworks the Gradle aspect of the samples as follows:

- removes settings.xml in each sample in favor of root samples/setting.xml
- removes Gradle wrapper from each sample in favor of root samples/gradlew
- cleans up build.gradle (they were missing dependencies to work)
- adds README-GRADLE.md at samples/

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-03-03 18:52:46 +00:00
Dave Syer
b423429b8f Revert to snapshot 2025-03-03 12:47:03 +00:00
Dave Syer
ae46cdffe5 Remove native-image.properties in samples 2025-03-03 10:50:36 +00:00
Dave Syer
24f7d20c2f Add some logging when services registered 2025-03-03 10:01:40 +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
Dave Syer
ebf9caa44d Add config property for http2 by default 2025-03-03 09:26:06 +00:00
Dave Syer
3047c27f9c Add (temporarily) some native image metadata
Still waiting for
https://github.com/oracle/graalvm-reachability-metadata/pull/593
2025-03-03 09:13:28 +00:00
Dave Syer
d32f13e6ed Match dependencies in gradle build 2025-03-03 08:51:03 +00:00
Dave Syer
244f87e8fe Fix some gradle builds 2025-02-25 18:05:41 +00:00
Dave Syer
babe00025d Remove some unnecessary code 2025-02-25 18:02:55 +00:00
Dave Syer
6853d2dad4 There may be more than one security configuration
In an app with servlets *and* a native gRPC server for instance,
the global AuthenticationManagerBuilder (the @Bean) should be
treated as a parent for the one used by GrpcSecurity. It's the
same in HttpSecurity. Slightly more complicated than necessary
when there is only native gRPC security, but at least it now
works, and makes it easier to introduce multiple GrpcSecurity
instances in future if necessary (like with HttpSecurity it
could be a prototype).
2025-02-24 16:23:43 +00:00
Dave Syer
dee423953f Add condition to guard security servlet config 2025-02-24 14:04:33 +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
Andrey Litvitski
1b782256b1 Update to Boot 3.4.3
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-02-24 12:39:35 +00:00
Chris Bono
581e841550 Update docs README w/ steps on generating config props
Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-21 13:10:11 -06:00
Andrey Litvitski
fbae1c9cb6 Generate config props during doc phase (#110)
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-02-21 13:09:12 -06:00
Andrey Litvitski
8d20f4a6d9 Fix typo in pom.xml in core module
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-02-15 11:20:59 -06: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
225c523490 Make Tomcat samples use new servlet server starter
Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
8f249148ed Add Netty server starter module
This adds a new starter module (`spring-grpc-server-spring-boot-starter`)
for gRPC Netty server and updates the current coarse-grained starter
(`spring-grpc-spring-boot-starter`) to include the newly added server
and client starter modules.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
7e01d36af3 Revert previous change in Netty shaded sample
The build.gradle previous use of `replacedBy` is consistent w/ what is already in the ref guide.

Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00
Chris Bono
b65c03d1c5 Fix pom.xml indentation issues from previous commits
Signed-off-by: Chris Bono <chris.bono@gmail.com>
2025-02-12 10:09:45 -06:00