Skip to content

Commit 783a9aa

Browse files
committed
docs: fix allowed-domain override example to pass the property via --args
A -Dregistration.guard.allowed-domain=... placed after the bootRun task sets the property on the Gradle JVM, which is not forwarded to the forked Spring Boot application, so the override silently no-ops. Pass it as a Spring Boot command-line argument inside --args instead (same mechanism used for --spring.profiles.active). Addresses PR review feedback.
1 parent 3c6d536 commit 783a9aa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,10 @@ This demo ships a sample implementation, [`DomainRegistrationGuard`](src/main/ja
345345
# Only @example.com email addresses can register via the form (OAuth2/OIDC still allowed)
346346
./gradlew bootRun --args='--spring.profiles.active=local,registration-guard'
347347
348-
# Override the allowed domain
349-
./gradlew bootRun --args='--spring.profiles.active=local,registration-guard' \
350-
-Dregistration.guard.allowed-domain=@mycompany.com
348+
# Override the allowed domain — pass it inside --args as a Spring Boot argument so it reaches the
349+
# forked application (a -D after the task sets it on the Gradle JVM only and is not forwarded)
350+
./gradlew bootRun \
351+
--args='--spring.profiles.active=local,registration-guard --registration.guard.allowed-domain=@mycompany.com'
351352
```
352353
353354
| Setting | Default | Purpose |

0 commit comments

Comments
 (0)