Add cloud-2026-upgrade: step-by-step upgrade of the shop to Spring Boot 4.2.0 / Spring Cloud 2026.0.0, with probes
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4HkWoC7hLzk61vZa8
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# order-service reads shop.order.* from the config server. OrderProperties is a Java record.
|
||||
|
||||
--- before
|
||||
$ curl localhost:8082/orders/config
|
||||
{"currency":"EUR","maxQuantity":10}
|
||||
|
||||
--- an unsigned request to /monitor (the curl most tutorials show)
|
||||
$ curl -X POST localhost:8888/monitor -d path=order-service
|
||||
HTTP 403
|
||||
|
||||
--- edit order-service.yml in the config repository: currency EUR -> USD, max-quantity 10 -> 3
|
||||
(no request sent: with a local file: repository the monitor module watches the directory itself)
|
||||
|
||||
--- config server log
|
||||
INFO o.s.c.c.m.FileMonitorConfiguration : Monitoring for local config changes: [run/config]
|
||||
INFO o.s.c.c.monitor.PropertyPathEndpoint : Refresh for: order-service
|
||||
|
||||
--- order-service log
|
||||
INFO o.s.cloud.endpoint.RefreshEndpoint : Refreshed keys : [shop.order.currency, shop.order.max-quantity]
|
||||
|
||||
--- what order-service uses after the refresh
|
||||
$ curl localhost:8082/orders/config
|
||||
{"currency":"EUR","maxQuantity":10}
|
||||
|
||||
--- a signed GitHub-style push webhook, the way a remote Git repository would call
|
||||
$ curl -X POST localhost:8888/monitor -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=<hmac>' -d '{"commits":[{"modified":["order-service.yml"]}]}'
|
||||
["order-service","order"]
|
||||
HTTP 200
|
||||
|
||||
--- same webhook, wrong signature
|
||||
HTTP 403
|
||||
Reference in New Issue
Block a user