From 209322cecd54085d03d0d2924e96167aea5d63ef Mon Sep 17 00:00:00 2001 From: slayerjain Date: Thu, 23 Apr 2026 16:50:26 +0530 Subject: [PATCH] docs(sap-demo-java): rewrite README and scrub Tricentis references Rewrites sap-demo-java/README.md to explain the real-world Customer 360 use case: one inbound /360 fans out to 3 parallel SAP OData calls plus 2 parallel Postgres queries, which is exactly the concurrency shape Keploy's v3 HTTPS + Postgres parsers are exercised against in CI. Renames the Java package from com.tricentisdemo.sap.customer360 to com.keploy.sapdemo.customer360; updates every import, the Maven groupId, application.yml log/logger references, and Resilience4j exception FQCN. Scrubs remaining Tricentis / Tosca mentions from Javadoc, pom description, .dockerignore, and demo narration scripts. simulate_tosca_flow.sh is renamed to simulate_fiori_flow.sh. No behavior change: mvn -DskipTests clean compile passes. Signed-off-by: slayerjain --- sap-demo-java/.dockerignore | 2 +- sap-demo-java/README.md | 402 ++++++++---------- sap-demo-java/demo_script.sh | 2 +- sap-demo-java/pom.xml | 11 +- ...e_tosca_flow.sh => simulate_fiori_flow.sh} | 34 +- .../customer360/Customer360Application.java | 10 +- .../customer360/config/SapClientConfig.java | 6 +- .../customer360/model/BusinessPartner.java | 6 +- .../model/BusinessPartnerAddress.java | 2 +- .../model/BusinessPartnerRole.java | 2 +- .../customer360/model/Customer360View.java | 8 +- .../customer360/model/CustomerSummary.java | 2 +- .../customer360/model/NoteRequest.java | 2 +- .../model/ODataCollectionResponse.java | 2 +- .../model/ODataEntityResponse.java | 4 +- .../customer360/model/ProblemResponse.java | 4 +- .../customer360/model/TagRequest.java | 2 +- .../customer360/persistence/AuditEvent.java | 2 +- .../customer360/persistence/CustomerNote.java | 2 +- .../customer360/persistence/CustomerTag.java | 2 +- .../repository/AuditEventRepository.java | 4 +- .../repository/CustomerNoteRepository.java | 4 +- .../repository/CustomerTagRepository.java | 4 +- .../customer360/sap/CorrelationIdFilter.java | 2 +- .../sap/CorrelationIdInterceptor.java | 4 +- .../customer360/sap/SapApiException.java | 4 +- .../sap/SapBusinessPartnerClient.java | 14 +- .../customer360/service/AuditService.java | 8 +- .../service/Customer360AggregatorService.java | 26 +- .../customer360/service/CustomerService.java | 8 +- .../customer360/service/NoteService.java | 6 +- .../customer360/service/TagService.java | 6 +- .../customer360/web/AuditController.java | 6 +- .../customer360/web/CustomerController.java | 12 +- .../web/GlobalExceptionHandler.java | 8 +- .../customer360/web/NoteController.java | 10 +- .../customer360/web/TagController.java | 10 +- .../src/main/resources/application.yml | 4 +- .../Customer360ApplicationTests.java | 2 +- 39 files changed, 290 insertions(+), 359 deletions(-) rename sap-demo-java/{simulate_tosca_flow.sh => simulate_fiori_flow.sh} (84%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/Customer360Application.java (86%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/config/SapClientConfig.java (96%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/BusinessPartner.java (96%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/BusinessPartnerAddress.java (97%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/BusinessPartnerRole.java (96%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/Customer360View.java (89%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/CustomerSummary.java (97%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/NoteRequest.java (91%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/ODataCollectionResponse.java (96%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/ODataEntityResponse.java (88%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/ProblemResponse.java (92%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/model/TagRequest.java (93%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/persistence/AuditEvent.java (97%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/persistence/CustomerNote.java (96%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/persistence/CustomerTag.java (97%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/repository/AuditEventRepository.java (75%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/repository/CustomerNoteRepository.java (75%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/repository/CustomerTagRepository.java (88%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/sap/CorrelationIdFilter.java (97%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/sap/CorrelationIdInterceptor.java (91%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/sap/SapApiException.java (95%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/sap/SapBusinessPartnerClient.java (95%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/service/AuditService.java (82%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/service/Customer360AggregatorService.java (90%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/service/CustomerService.java (82%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/service/NoteService.java (84%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/service/TagService.java (91%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/web/AuditController.java (88%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/web/CustomerController.java (90%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/web/GlobalExceptionHandler.java (96%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/web/NoteController.java (89%) rename sap-demo-java/src/main/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/web/TagController.java (91%) rename sap-demo-java/src/test/java/com/{tricentisdemo/sap => keploy/sapdemo}/customer360/Customer360ApplicationTests.java (96%) diff --git a/sap-demo-java/.dockerignore b/sap-demo-java/.dockerignore index f1b84a24..9c56a06f 100644 --- a/sap-demo-java/.dockerignore +++ b/sap-demo-java/.dockerignore @@ -16,5 +16,5 @@ k8s/secret.yaml /tmp README.md demo_script.sh -simulate_tosca_flow.sh +simulate_fiori_flow.sh deploy_kind.sh diff --git a/sap-demo-java/README.md b/sap-demo-java/README.md index 09acfc90..1a89f318 100644 --- a/sap-demo-java/README.md +++ b/sap-demo-java/README.md @@ -1,302 +1,232 @@ -# Customer 360 — SAP Integration Service (Java / Spring Boot / K8s) +# sap-demo-java — Customer 360 aggregation service -Enterprise-grade reference implementation of the most common SAP integration -pattern in RISE with SAP landscapes: a **Customer 360 aggregator** that -fans out to multiple S/4HANA Business Partner OData endpoints and composes -them into a unified view for downstream CRM / portal / analytics consumers. - -Built for the Tricentis evaluation demo. Deliberately looks like code a -Tricentis customer would already recognise: Spring Boot 3, Java 21, -Resilience4j, Actuator, OpenAPI, correlation-id propagation, RFC 7807 -problem responses, multi-stage Docker build, production-grade Kubernetes -manifests, kind-ready. +Spring Boot 3 / Java 21 reference service that builds a **Customer 360 view** +on the fly by fanning out to SAP S/4HANA Business Partner OData endpoints +and merging the result with locally stored CRM annotations (tags + notes) +from Postgres. Used inside the Keploy project as the canonical regression +fixture for the SAP fan-out path and the v3 HTTPS + Postgres parsers. --- -## The one-line pitch - -> Tosca drives Fiori; Keploy records that **one inbound click fans out to -> three parallel SAP OData calls** that Tosca cannot see. +## What this app does -A typical `GET /api/v1/customers/202/360` produces: +This is a small "Customer 360" aggregator, the kind of service an internal +CRM dashboard team would ship on SAP BTP. When a user hits +`GET /api/v1/customers/{id}/360`, the service fans out: **one synchronous +SAP OData call** for the BusinessPartner master record, then **two more +parallel SAP OData calls** (addresses + roles), **in parallel with two +Postgres queries** (tags + notes). The five results are merged into a single +JSON response. -``` - inbound (1) outbound SAP OData (3, parallel) - ───────────── ───────────────────────────────────────── - /360 ────► /A_BusinessPartner('202') - /A_BusinessPartnerAddress?$filter=…'202' - /A_BusinessPartnerRole?$filter=…'202' -``` - -One Keploy eBPF probe captures every call on that flow. Replay them with -SAP unreachable and the whole 360 aggregation still works, deterministically. +The real-world analog is an in-house CRM dashboard that needs a unified +customer view by calling the system-of-record (SAP) plus a local CRM +annotations DB (Postgres), without any surface area that hides how those +downstream calls behave on the wire. --- -## Architecture +## Why this shape is interesting for Keploy + +The service is deliberately structured to exercise the trickiest parts of +Keploy's interception layer in a single flow. + +- **Parallel outbound TLS** — every `/360` request opens 3 concurrent HTTPS + connections to the SAP sandbox plus 2 concurrent TLS-enabled Postgres + queries. This shape reliably surfaces parser-level concurrency bugs. +- **Chunked HTTP/1.1 + keep-alive reuse** — SAP's sandbox returns chunked + responses over a reused keep-alive connection. This is the path that + exposed a 60-second idle-timeout stall inside Keploy (a single `/360` + request went from ~50 s down to ~586 ms after the fix). See + [keploy/keploy#4110](https://github.com/keploy/keploy/pull/4110). +- **Schema diversity in a single repo** — GET / POST / DELETE verbs, JSON + request bodies, a custom `X-Correlation-Id` header, actuator health + probes, both chunked and Content-Length responses, and the OpenAPI + `/v3/api-docs` catalog endpoint. +- **Stateful local DB** — Flyway-migrated schema behind a HikariCP + connection pool, which exercises the v3 Postgres parser's + prepared-statement cache handling and pool-reuse semantics. -``` - ┌──────────────────────────────────┐ - downstream consumer │ customer360 (this service) │ - (CRM, portal, analytics) ───┤ │ - │ ┌───── CustomerController ───┐ │ - │ │ /customers, /{id}, │ │ - │ │ /{id}/360, /count │ │ - │ └────────┬───────────────────┘ │ - │ │ │ - │ ┌────────▼──────────┐ │ - │ │ Customer360Aggr. │ ◄── parallel fan-out - │ │ + CustomerService │ │ - │ └────────┬──────────┘ │ - │ │ │ - │ ┌────────▼──────────────────┐ │ - │ │ SapBusinessPartnerClient │ │ - │ │ + Resilience4j retry/cb │ │ - │ │ + RestTemplate │ │ - │ └────────┬──────────────────┘ │ - └───────────┼────────────────────────┘ - │ HTTPS + APIKey/Bearer - ▼ - https://sandbox.api.sap.com/s4hanacloud - (or real BTP tenant) -``` - -## REST surface +--- -| Method | Path | What it does | -|--------|--------------------------------|---------------------------------------------| -| GET | /api/v1/customers | Paged list of customer summaries | -| GET | /api/v1/customers/count | Total partner count (KPI tile) | -| GET | /api/v1/customers/{id} | Single business partner master data | -| GET | **/api/v1/customers/{id}/360** | **Aggregated 360 view — fans out to 3 SAP calls in parallel** | -| GET | /actuator/health | K8s liveness / readiness | -| GET | /actuator/prometheus | Metrics | -| GET | /swagger-ui.html | OpenAPI UI | -| GET | /v3/api-docs | OpenAPI 3 spec | +## Requirements -Swagger UI inside the kind cluster: `http://localhost:30080/swagger-ui.html`. +- Java 21 + Maven 3.9+ +- Docker (Postgres 16 is brought up as a sidecar via `docker compose`) +- A Keploy binary if you want to record / replay (any v3.3.x or newer is fine) +- An SAP API sandbox key — grab one for free from the SAP Business + Accelerator Hub: + [api.sap.com/api/API_BUSINESS_PARTNER](https://api.sap.com/api/API_BUSINESS_PARTNER). + Click *Show API Key* once signed in. --- -## Quick start (kind cluster) +## Local quickstart ```bash cd sap-demo-java -# 1. One-time: drop your SAP API key into .env -cp .env.example .env -$EDITOR .env # paste SAP_API_KEY - -# 2. Stand everything up: kind cluster + build + load + apply -./deploy_kind.sh - -# 3. Exercise the deployed service -./demo_script.sh exercise +# 1. Bring up Postgres in the background (or use ./deploy_kind.sh for k8s) +docker compose up -d postgres -# 4. Look inside — preferred URL via Ingress on port 80 -curl -s http://customer360.localtest.me/actuator/health | jq . -curl -s http://customer360.localtest.me/api/v1/customers/count | jq . -curl -s http://customer360.localtest.me/api/v1/customers/202/360 | jq '.partner.BusinessPartnerFullName, (.addresses | length), (.roles | length)' +# 2. Point the app at the SAP sandbox +export SAP_API_KEY= +export SAP_SANDBOX_BASE_URL=https://sandbox.api.sap.com/s4hanacloud -# …or fall back to NodePort 30080 (also works on the default kind-config) -curl -s http://localhost:30080/actuator/health | jq . - -# 5. Stream logs (structured JSON with correlationId) -./deploy_kind.sh logs - -# 6. Tear down -./deploy_kind.sh destroy +# 3. Build and run +mvn spring-boot:run ``` -The `./deploy_kind.sh` script is idempotent. Re-run after code changes to -rebuild and roll the deployment. - -### Targeting a non-default cluster - -The script defaults to a cluster named `sap-demo`, but you can point it at -any kind cluster via `--cluster NAME` / `-c NAME` / the `KIND_CLUSTER` -env var: +The service listens on `:8080`. Smoke-test it: ```bash -# Flag form -./deploy_kind.sh --cluster my-existing-cluster apply -./deploy_kind.sh -c keploy-bug2 apply - -# Env-var form -KIND_CLUSTER=my-existing-cluster ./deploy_kind.sh apply - -# Flag wins over env var if both are set. +curl -s http://localhost:8080/actuator/health | jq . +curl -s http://localhost:8080/api/v1/customers/202/360 | jq . ``` -Useful when deploying into a cluster that already hosts Keploy's -`k8s-proxy` (see `../k8s-proxy/README.md`). The script will skip cluster -creation if the named cluster already exists. If the existing cluster -wasn't created from `kind-config.yaml`, it probably doesn't have port -`30080` mapped to the host — the script will warn and suggest -`kubectl port-forward` instead. - --- -## Recording with Keploy — two modes - -### Mode A — local binary + eBPF on the host (simplest) +## Recording with Keploy (native CLI) -Same mechanic as `sap_demo_A`. Run the JVM directly on Linux; Keploy attaches -eBPF probes to the Go/Java/Node process on the host. +Run the service under `keploy record`, exercise it with `run_flow.sh` +(which fires 20 distinct request shapes covering every endpoint and +verb), then replay: ```bash -./demo_script.sh record-local # builds, starts under keploy record, exercises -./demo_script.sh test-local # replays -./demo_script.sh offline-test # replays with SAP blackholed in /etc/hosts -``` +# terminal 1 — record +keploy record -c "java -jar target/customer360.jar" -Captured artefact: `keploy/test-set-0/tests/*.yaml` + `keploy/test-set-0/mocks.yaml`. +# terminal 2 — drive traffic +bash run_flow.sh -### Mode B — Keploy inside the kind cluster (production-shaped) +# Ctrl+C the record command. Testcases land under ./keploy/ +# then replay: +keploy test -c "java -jar target/customer360.jar" +``` + +--- -The `keploy.io/record: "enabled"` annotation on the Deployment marks this pod -as a candidate for live recording via the `k8s-proxy` Helm chart (see -`../k8s-proxy/README.md`). The `Namespace` is labelled `keploy.io/enabled: "true"` -for the same reason. +## Recording inside Kubernetes (k8s-proxy) -Summary — full steps are in `./demo_script.sh record-k8s`: +The same flow runs in-cluster through the Keploy k8s-proxy. Deploy the +app to kind: ```bash -# 1. deploy the app (this repo) ./deploy_kind.sh +kubectl -n sap-demo annotate deploy/customer360 keploy.io/record=enabled -# 2. install k8s-proxy alongside (from ../k8s-proxy) -helm upgrade --install k8s-proxy ../k8s-proxy/charts/k8s-proxy \ - --namespace keploy --create-namespace +# start recording +curl -k -X POST https://:8080/record/start \ + -H "Authorization: Bearer $KEPLOY_SHARED_TOKEN_OVERRIDE" \ + -d '{"namespace":"sap-demo","deployment":"customer360"}' -# 3. drive traffic — tests stream back to the enterprise-ui dashboard -./demo_script.sh exercise +# drive traffic (e.g. run_flow.sh against the NodePort / Ingress host) +./run_flow.sh + +# stop recording — auto-replay then fires on a standalone pod +curl -k -X POST https://:8080/record/stop \ + -d '{"record_id":"sap-demo-customer360"}' ``` -Mode B demonstrates the story that matters to an enterprise buyer: **Keploy -works in Kubernetes, not just on a developer laptop.** +Replay results land in the enterprise dashboard at +[app.keploy.io](https://app.keploy.io). --- -## The two-terminal "Tosca sidecar" demo - -Terminal 1 — Keploy recording the app: -```bash -./demo_script.sh record-local # just the record half — Ctrl+C when done -``` - -Terminal 2 — the narrated Tosca-driven flow: -```bash -./simulate_tosca_flow.sh --host http://localhost:8080 -# or, if the app is in kind: -./simulate_tosca_flow.sh --host http://localhost:30080 -``` +## Key endpoints -The narrator script logs what Tosca would "click" in the Fiori UI and -what Keploy captures underneath. The 360 step in particular is the pitch — -**one inbound click, three outbound SAP OData calls**, all recorded. +| Method | Path | Purpose | Downstream | +|---------|------------------------------------------|-----------------------------------------|----------------------------------| +| GET | `/actuator/health` | Liveness / readiness probe | none | +| GET | `/api/v1/customers/count` | KPI tile — total partner count | Postgres only | +| GET | `/api/v1/customers/{id}` | Business partner detail | SAP only | +| GET | `/api/v1/customers/{id}/tags` | Customer tags | Postgres only | +| GET | **`/api/v1/customers/{id}/360`** | **Full aggregation** | **SAP × 3 + Postgres × 2 parallel** | +| POST | `/api/v1/customers/{id}/tags` | Add a tag | Postgres only | +| POST | `/api/v1/customers/{id}/notes` | Add a note | Postgres only | +| DELETE | `/api/v1/customers/{id}/tags/{tag}` | Remove a tag | Postgres only | +| GET | `/v3/api-docs` | OpenAPI catalog | none | --- -## Configuration +## Noise configuration -All runtime config is externalised. The ConfigMap (`k8s/configmap.yaml`) and -Secret (`k8s/secret.yaml`, from `.example`) are the K8s sources of truth. -For local / compose runs, `.env` takes their place. +`keploy.yml` marks three fields as global noise so replays stay +deterministic across runs: -| Env var | Default | Notes | -|----------------------|----------------------------------------------|---------------------------------------| -| `SAP_API_BASE_URL` | `https://sandbox.api.sap.com/s4hanacloud` | Upstream SAP tenant | -| `SAP_API_KEY` | *(empty)* | Sandbox API key | -| `SAP_BEARER_TOKEN` | *(empty)* | Preferred if set (real BTP tenant) | -| `SERVER_PORT` | `8080` | Container listen port | -| `SPRING_PROFILES_ACTIVE` | `default` locally, `kubernetes` in K8s | Toggles JSON log formatter | +- `header.X-Correlation-Id` — generated per-request by `CorrelationIdFilter`; + it's intentionally unique per call, so it can never match on replay. +- `body.timestamp` / `body.installedOn` / `body.id` — server-generated + values on write paths (tag / note rows). The semantic content is stable; + the numeric/temporal surface is not. +- `ETag` on SAP responses (and `Date` headers) — SAP regenerates these on + every fetch, independent of the underlying record state. -Resilience4j retry / circuit-breaker settings live in `application.yml` -under `resilience4j.*`. Defaults: 3 attempts, exponential backoff, CB opens -at 60% failure over 20 calls, 30s open-state cool-down. +If your team adds more generated fields, extend `test.globalNoise.global` +in `keploy.yml`. --- -## Files - -| Path | Purpose | -|---|---| -| `pom.xml` | Maven — Spring Boot 3, Java 21, Resilience4j, Actuator, SpringDoc | -| `src/main/java/.../Customer360Application.java` | Spring Boot entry + OpenAPI metadata | -| `src/main/java/.../config/SapClientConfig.java` | `RestTemplate` + auth / encoding / correlation interceptors + fan-out executor | -| `src/main/java/.../web/CustomerController.java` | REST endpoints | -| `src/main/java/.../web/GlobalExceptionHandler.java` | RFC 7807 problem responses | -| `src/main/java/.../service/CustomerService.java` | Simple lookups | -| `src/main/java/.../service/Customer360AggregatorService.java` | **Fan-out aggregator — the demo money shot** | -| `src/main/java/.../sap/SapBusinessPartnerClient.java` | Low-level SAP gateway with retry / CB | -| `src/main/java/.../sap/CorrelationIdFilter.java` | Inbound correlation-id seeder | -| `src/main/java/.../sap/CorrelationIdInterceptor.java` | Outbound correlation-id propagator | -| `src/main/java/.../sap/SapApiException.java` | SAP-specific exception | -| `src/main/java/.../model/*.java` | DTOs: BusinessPartner, Address, Role, Customer360View, … | -| `src/main/resources/application.yml` | Externalised config | -| `src/main/resources/logback-spring.xml` | Console (dev) + JSON (kubernetes) appenders | -| `Dockerfile` | Multi-stage build, non-root runtime, Spring Boot layers | -| `docker-compose.yml` | Local dev without kind | -| `kind-config.yaml` | Ingress-ready kind cluster (host 80/443 + 30080 mapped, `ingress-ready=true` label) | -| `k8s/namespace.yaml` | Namespace with `keploy.io/enabled: "true"` marker | -| `k8s/configmap.yaml` | Non-secret runtime config | -| `k8s/secret.yaml.example` | Template for `SAP_API_KEY` secret | -| `k8s/deployment.yaml` | Liveness/readiness probes, resource limits, security context | -| `k8s/service.yaml` | NodePort 30080 (works standalone, also the Ingress backend) | -| `k8s/ingress.yaml` | Ingress at `customer360.localtest.me` + catch-all at `localhost` | -| `deploy_kind.sh` | One-shot cluster + build + load + apply | -| `demo_script.sh` | Record / replay / offline-test harness | -| `simulate_tosca_flow.sh` | Narrated Tosca-driven Fiori flow | - ---- +## Architecture -## What makes this "enterprise-grade" (and why Tricentis folks will recognise it) - -- **Spring Boot 3 + Java 21** — the default stack in most RISE customers -- **Layered: controller → service → SAP client** — classic separation -- **Resilience4j retry + circuit breaker** on every SAP call -- **RFC 7807 problem responses** with `X-Upstream-Status` for SAP diagnostics -- **Correlation-id propagation** end-to-end (inbound filter + outbound interceptor) -- **Structured JSON logs** in the `kubernetes` profile -- **Actuator probes** wired to K8s liveness + readiness, with circuit-breaker health included -- **Prometheus metrics** with request histograms / percentiles -- **OpenAPI 3 / Swagger UI** for API discovery -- **Non-root Docker runtime**, `readOnlyRootFilesystem`, capabilities dropped -- **Multi-stage Spring Boot layered image** for fast rebuilds -- **Graceful shutdown** with 30s termination grace period for rolling deploys -- **NodePort 30080** aligned with the `k8s-proxy` convention used elsewhere in this repo +Classic Spring Boot layering, with one custom wrinkle for the fan-out: + +- **Controller** — `web/Customer360Controller.java` (+ `CustomerController`, + `TagController`, `NoteController`, `AuditController`). RFC 7807 problem + responses come from `web/GlobalExceptionHandler`. +- **Aggregator** — `service/Customer360AggregatorService.java`. Builds + three `CompletableFuture`s for the SAP calls and two more for the + Postgres queries, all dispatched on a dedicated `sapCallExecutor` thread + pool, then joins them via `CompletableFuture.allOf`. Partial-failure + policy: the SAP partner fetch is mandatory; everything else degrades + gracefully. +- **SAP client** — `sap/SapBusinessPartnerClient.java`. Spring + `RestTemplate` backed by the Apache `HttpComponents5` client factory + (keep-alive + transparent gzip handling, which the JDK default doesn't + offer). Retries + circuit breaker via Resilience4j (`sapApi` instance in + `application.yml`). +- **Persistence** — `repository/CustomerTagRepository.java` and + `CustomerNoteRepository.java` (Spring Data JPA), plus + `AuditEventRepository`. Schema is Flyway-migrated + (`src/main/resources/db/migration/V1__init_schema.sql`); pool is + HikariCP with `maximum-pool-size=10`. +- **Correlation** — inbound `CorrelationIdFilter` seeds the MDC; + outbound `CorrelationIdInterceptor` propagates the ID on every SAP call. --- ## Troubleshooting -| Symptom | Fix | -|---|---| -| `401 Unauthorized` from SAP | `SAP_API_KEY` missing or expired. Verify with `curl -H "APIKey: $SAP_API_KEY" https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?\$top=1` | -| `ImagePullBackOff` in kind | You forgot to `kind load docker-image customer360:local`. Run `./deploy_kind.sh build`. | -| `ErrImageNeverPull` | `imagePullPolicy: IfNotPresent` and image not loaded. Same fix. | -| Liveness probe failing at startup | 40s `startupProbe` grace should cover the JVM warm-up; if not, raise `failureThreshold` in `k8s/deployment.yaml`. | -| Circuit breaker stuck open | Check SAP is actually reachable; inspect `/actuator/health` → `components.circuitBreakers`. | -| `./deploy_kind.sh` says kind not found | Install with `go install sigs.k8s.io/kind@latest` or from the kind release page. | -| Rate-limited (429) from SAP sandbox | Sandbox is per-minute limited. Wait 60s, or switch to offline replay which never touches SAP. | -| Keploy recording on port 8080 | Runs the JVM; Keploy's default proxy/DNS ports are 16789/26789 — check `ss -ltnp` if you see bind errors. | +- **`502 SAP upstream error` on `/360`.** Check `SAP_API_KEY`; the SAP + sandbox also rate-limits at roughly 120 requests/minute. The built-in + Resilience4j circuit breaker will open if you punch through that. +- **Recording stalls / `/360` takes ~60 s.** You're probably on Keploy + < v3.3, which had an HTTP chunked-terminator bug on keep-alive reuse. + Upgrade to v3.3.x or newer (fixed in + [keploy/keploy#4110](https://github.com/keploy/keploy/pull/4110)). +- **Tests fail only on `X-Correlation-Id`.** Make sure the header is in + `test.globalNoise.global` in `keploy.yml`; it's generated per request + and can never match otherwise. +- **`ImagePullBackOff` / `ErrImageNeverPull` in kind.** You forgot to + `kind load docker-image customer360:local` — run `./deploy_kind.sh build`. +- **Liveness probe flaps at startup.** The 40 s `startupProbe` grace is + usually enough for the JVM; raise `failureThreshold` in + `k8s/deployment.yaml` if your host is slow. --- -## Extending this - -The obvious next moves for a real RISE customer: - -1. **OAuth2 client-credentials** (xsuaa) flow for production BTP tenants — - see `sap_demo_B` for the Go equivalent; the pattern is the same. -2. **Kafka producer** that publishes `customer.360.changed` events on - write flows — another recording surface for Keploy. -3. **Caching layer** (Redis) in front of SAP to absorb read bursts — - Keploy records those hits too. -4. **Ingress + mTLS** replacing NodePort for production topology. -5. **HelmChart** packaging to match the k8s-proxy deployment style. +## Files -All of the above extend the integration graph, which extends Keploy's -demonstrable value surface. Nothing about them requires rewriting this -service — the layered design absorbs them cleanly. +| Path | Purpose | +|---|---| +| `pom.xml` | Spring Boot 3, Java 21, Resilience4j, Flyway, HikariCP, SpringDoc | +| `src/main/java/com/keploy/sapdemo/customer360/...` | Application source (see *Architecture* above) | +| `src/main/resources/application.yml` | Externalised config | +| `src/main/resources/db/migration/V1__init_schema.sql` | Flyway schema: `customer_tag`, `customer_note`, `audit_event` | +| `docker-compose.yml` | Local Postgres 16 sidecar | +| `Dockerfile` | Multi-stage, non-root Spring Boot layered image | +| `k8s/*.yaml` | Namespace / ConfigMap / Secret / Deployment / Service / Ingress | +| `deploy_kind.sh` | One-shot kind cluster + build + load + apply | +| `run_flow.sh` | 20-request exerciser used during `keploy record` | +| `demo_script.sh` | Record / replay / offline-test harness | +| `simulate_fiori_flow.sh` | Narrated Fiori-style flow for two-terminal demos | +| `keploy.yml` | Recorded-mock metadata + global noise rules | diff --git a/sap-demo-java/demo_script.sh b/sap-demo-java/demo_script.sh index 0419056e..993cbabe 100755 --- a/sap-demo-java/demo_script.sh +++ b/sap-demo-java/demo_script.sh @@ -37,7 +37,7 @@ fail() { printf "${BOLD}${RED}XX %s${NC}\n" "$*"; } BASE_URL="${BASE_URL:-http://localhost:30080}" # ---------------------------------------------------------------------------- -# exercise_endpoints — the scripted "Tosca-style" business flow that drives +# exercise_endpoints — the scripted UI-style business flow that drives # the service while Keploy records underneath. 1 inbound → many SAP calls. # ---------------------------------------------------------------------------- exercise_endpoints() { diff --git a/sap-demo-java/pom.xml b/sap-demo-java/pom.xml index 5c4d3a70..27cdeda1 100644 --- a/sap-demo-java/pom.xml +++ b/sap-demo-java/pom.xml @@ -11,17 +11,16 @@ - com.tricentisdemo.sap + com.keploy.sapdemo customer360 1.0.0 jar SAP Customer 360 Service - Enterprise-grade Spring Boot integration service that aggregates SAP Business Partner - data from multiple S/4HANA OData endpoints into a unified Customer 360 view. - Designed as a reference implementation for RISE with SAP landscapes — the kind of - BTP-style integration middleware Tricentis customers build and must regression-test - during ECC → S/4HANA Cloud migrations. + Spring Boot integration service that aggregates SAP Business Partner data from multiple + S/4HANA OData endpoints into a unified Customer 360 view, merged with locally stored + CRM tags and notes from Postgres. Used as a regression-testing sample for Keploy's SAP + fan-out handling and its HTTPS + Postgres parsers. diff --git a/sap-demo-java/simulate_tosca_flow.sh b/sap-demo-java/simulate_fiori_flow.sh similarity index 84% rename from sap-demo-java/simulate_tosca_flow.sh rename to sap-demo-java/simulate_fiori_flow.sh index 822ece43..5051bd3b 100755 --- a/sap-demo-java/simulate_tosca_flow.sh +++ b/sap-demo-java/simulate_fiori_flow.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# simulate_tosca_flow.sh — narrated "Tosca drives Fiori; Keploy records the +# simulate_fiori_flow.sh — narrated "UI drives Fiori; Keploy records the # 3-way fan-out underneath" demo for the Customer 360 service. # # Run this while `keploy record` is recording the service in another terminal. @@ -29,8 +29,8 @@ BOLD='\033[1m'; DIM='\033[2m'; GREEN='\033[0;32m'; BLUE='\033[0;34m' YELLOW='\033[1;33m'; MAGENTA='\033[0;35m'; NC='\033[0m' pause() { [ "$FAST" = "1" ] || sleep "${1:-2}"; } -tosca_step() { printf "\n${BOLD}${MAGENTA}[TOSCA UI]${NC} %s\n" "$1"; pause 1; } -tosca_click() { printf "${DIM} ↳ clicks:${NC} %s\n" "$1"; pause 1; } +ui_step() { printf "\n${BOLD}${MAGENTA}[FIORI UI]${NC} %s\n" "$1"; pause 1; } +ui_click() { printf "${DIM} ↳ clicks:${NC} %s\n" "$1"; pause 1; } backend() { printf "${BOLD}${BLUE}[KEPLOY ]${NC} ${DIM}%s${NC}\n" "$1"; } call() { @@ -55,7 +55,7 @@ check_reachable() { banner() { printf "\n${BOLD}" printf "═══════════════════════════════════════════════════════════════════\n" - printf " Simulated Tosca-driven Fiori flow: 'Customer 360 in Sales Cockpit'\n" + printf " Simulated Fiori-driven flow: 'Customer 360 in Sales Cockpit'\n" printf " Keploy records every outbound SAP OData call in parallel.\n" printf " Target: ${HOST}\n" printf "═══════════════════════════════════════════════════════════════════${NC}\n" @@ -66,8 +66,8 @@ banner pause 2 # ───────────────────────────────────────────────────────────────────────────── -tosca_step "Opening Sales Cockpit → clicking 'Customers' tile" -tosca_click "Customers launchpad tile" +ui_step "Opening Sales Cockpit → clicking 'Customers' tile" +ui_click "Customers launchpad tile" backend "Tile click fans out: list query + KPI count" call "GET /api/v1/customers/count (KPI tile)" "${HOST}/api/v1/customers/count" pause 2 @@ -75,38 +75,38 @@ call "GET /api/v1/customers?top=5 (list grid)" "${HOST}/api/v1/custom pause 2 # ───────────────────────────────────────────────────────────────────────────── -tosca_step "On the customer list, opening row BP=11" -tosca_click "Row BusinessPartner=11" +ui_step "On the customer list, opening row BP=11" +ui_click "Row BusinessPartner=11" backend "Detail fetch — single SAP OData GET" call "GET /api/v1/customers/11 (detail)" "${HOST}/api/v1/customers/11" pause 2 # ───────────────────────────────────────────────────────────────────────────── -tosca_step "User clicks '360° view' on BP=202 — this is the fan-out moment" -tosca_click "360° view button" +ui_step "User clicks '360° view' on BP=202 — this is the fan-out moment" +ui_click "360° view button" backend "ONE inbound → THREE parallel SAP OData calls:" backend " • /A_BusinessPartner('202')" backend " • /A_BusinessPartner('202')/to_BusinessPartnerAddress" backend " • /A_BusinessPartner('202')/to_BusinessPartnerRole" -backend "Tosca asserts on the UI tile. Keploy captures all three on the wire." +backend "UI tests assert on the surface. Keploy captures all three on the wire." call "GET /api/v1/customers/202/360 (360 fan-out)" "${HOST}/api/v1/customers/202/360" pause 3 # ───────────────────────────────────────────────────────────────────────────── -tosca_step "Drilling into a second customer — BP=11 360" -tosca_click "Back → select BP=11 → 360° view" +ui_step "Drilling into a second customer — BP=11 360" +ui_click "Back → select BP=11 → 360° view" call "GET /api/v1/customers/11/360 (360 fan-out)" "${HOST}/api/v1/customers/11/360" pause 2 # ───────────────────────────────────────────────────────────────────────────── printf "\n${BOLD}${GREEN}" printf "═══════════════════════════════════════════════════════════════════\n" -printf " Tosca flow complete. What happened in two panes:\n" +printf " Fiori flow complete. What happened in two panes:\n" printf "═══════════════════════════════════════════════════════════════════${NC}\n\n" cat <<'EOF' ┌─────────────────────────────┬─────────────────────────────────────────┐ - │ TOSCA (this terminal) │ KEPLOY (other terminal) │ + │ UI LAYER (this terminal) │ KEPLOY (other terminal) │ ├─────────────────────────────┼─────────────────────────────────────────┤ │ • 5 Fiori interactions │ • 5 inbound HTTP test cases captured │ │ • Asserted on UI state │ • ~11 outbound SAP OData mocks │ @@ -114,8 +114,8 @@ cat <<'EOF' │ │ • Full vertical slice: UI click→DB row │ └─────────────────────────────┴─────────────────────────────────────────┘ - One UI flow, two coverage layers. Tosca owns the surface. Keploy owns - the plumbing Tosca could not see before — especially the hidden parallel + One UI flow, two coverage layers. UI suites own the surface. Keploy owns + the plumbing they could not see before — especially the hidden parallel fan-out behind the 360° tile. Stop Keploy in its terminal, then: diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/Customer360Application.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/Customer360Application.java similarity index 86% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/Customer360Application.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/Customer360Application.java index 5a4f81e8..902a6e1e 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/Customer360Application.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/Customer360Application.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360; +package com.keploy.sapdemo.customer360; import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.info.Contact; @@ -20,9 +20,11 @@ * assigned roles — aggregated into a flat response. * * In a typical RISE with SAP landscape this would run as a BTP extension - * (Cloud Foundry or Kyma/Kubernetes). It's the kind of service that Tricentis - * LiveCompare flags as "impacted by migration" and that teams must regression- - * test end-to-end after every S/4HANA quarterly update. + * (Cloud Foundry or Kyma/Kubernetes). It's the kind of service teams + * regression-test end-to-end after every S/4HANA quarterly update, and the + * workload Keploy uses to validate its SAP fan-out handling (parallel + * outbound TLS + keep-alive + chunked responses) alongside its Postgres + * parser. */ @SpringBootApplication @EnableAsync diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/config/SapClientConfig.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/config/SapClientConfig.java similarity index 96% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/config/SapClientConfig.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/config/SapClientConfig.java index 2559bf13..490d4104 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/config/SapClientConfig.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/config/SapClientConfig.java @@ -1,6 +1,6 @@ -package com.tricentisdemo.sap.customer360.config; +package com.keploy.sapdemo.customer360.config; -import com.tricentisdemo.sap.customer360.sap.CorrelationIdInterceptor; +import com.keploy.sapdemo.customer360.sap.CorrelationIdInterceptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -34,7 +34,7 @@ * * *

An {@link Executor} bean is also exposed for the - * {@link com.tricentisdemo.sap.customer360.service.Customer360AggregatorService} + * {@link com.keploy.sapdemo.customer360.service.Customer360AggregatorService} * fan-out pattern. The three SAP OData calls run in parallel; the pool is * intentionally small to avoid overwhelming the SAP API manager during * regression test runs. diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartner.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartner.java similarity index 96% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartner.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartner.java index f408c732..d9f75c38 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartner.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartner.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -11,8 +11,8 @@ * {@code ignoreUnknown = true} so a downstream addition of a new field by * SAP doesn't break this client — but a removal or rename * of a consumed field will surface as a missing value during - * {@code keploy test}, which is exactly the contract-drift signal - * Tricentis customers need after quarterly S/4HANA updates. + * {@code keploy test}, which is exactly the contract-drift signal teams + * need after quarterly S/4HANA updates. */ @JsonIgnoreProperties(ignoreUnknown = true) public class BusinessPartner { diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartnerAddress.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartnerAddress.java similarity index 97% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartnerAddress.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartnerAddress.java index c9ebf67c..be4d4b18 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartnerAddress.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartnerAddress.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartnerRole.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartnerRole.java similarity index 96% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartnerRole.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartnerRole.java index d89378bb..a8d5cd78 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/BusinessPartnerRole.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/BusinessPartnerRole.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/Customer360View.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/Customer360View.java similarity index 89% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/Customer360View.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/Customer360View.java index 046dde6a..6b43b8bf 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/Customer360View.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/Customer360View.java @@ -1,7 +1,7 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; -import com.tricentisdemo.sap.customer360.persistence.CustomerNote; -import com.tricentisdemo.sap.customer360.persistence.CustomerTag; +import com.keploy.sapdemo.customer360.persistence.CustomerNote; +import com.keploy.sapdemo.customer360.persistence.CustomerTag; import java.time.Instant; import java.util.List; @@ -10,7 +10,7 @@ * The aggregated "Customer 360" response returned to downstream consumers. * *

Produced by - * {@link com.tricentisdemo.sap.customer360.service.Customer360AggregatorService} + * {@link com.keploy.sapdemo.customer360.service.Customer360AggregatorService} * from three parallel SAP OData calls + two parallel Postgres queries + * one audit INSERT. This composite shape is the kind of payload * downstream CRM / portal / analytics pipelines consume in typical RISE diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/CustomerSummary.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/CustomerSummary.java similarity index 97% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/CustomerSummary.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/CustomerSummary.java index d7a66ca1..1c39a52a 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/CustomerSummary.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/CustomerSummary.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; /** * Flat, list-friendly projection of a {@link BusinessPartner} for the diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/NoteRequest.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/NoteRequest.java similarity index 91% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/NoteRequest.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/NoteRequest.java index d8481ffd..5fbb8f1f 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/NoteRequest.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/NoteRequest.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ODataCollectionResponse.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ODataCollectionResponse.java similarity index 96% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ODataCollectionResponse.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ODataCollectionResponse.java index b753e75b..27be047b 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ODataCollectionResponse.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ODataCollectionResponse.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ODataEntityResponse.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ODataEntityResponse.java similarity index 88% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ODataEntityResponse.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ODataEntityResponse.java index e98c9ffb..7d74baa7 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ODataEntityResponse.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ODataEntityResponse.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,7 +14,7 @@ * returns the entity at the root — when this service is migrated to v4 APIs * (e.g., {@code /API_BUSINESS_PARTNER_SRV/A_BusinessPartner('11')} in * S/4HANA Cloud), this envelope goes away. That shift is the exact kind of - * change a Tricentis migration customer has to regression-test. + * change migration teams have to regression-test. */ @JsonIgnoreProperties(ignoreUnknown = true) public class ODataEntityResponse { diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ProblemResponse.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ProblemResponse.java similarity index 92% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ProblemResponse.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ProblemResponse.java index 3ad05c01..d169120b 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/ProblemResponse.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/ProblemResponse.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import com.fasterxml.jackson.annotation.JsonInclude; @@ -7,7 +7,7 @@ /** * RFC 7807 Problem Details for HTTP APIs response body. * - *

Returned by {@link com.tricentisdemo.sap.customer360.web.GlobalExceptionHandler} + *

Returned by {@link com.keploy.sapdemo.customer360.web.GlobalExceptionHandler} * for any unhandled exception surfaced by the service. Stable shape so that * downstream consumers (and Keploy mock diffs) can rely on it. */ diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/TagRequest.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/TagRequest.java similarity index 93% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/TagRequest.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/TagRequest.java index 088310cd..691afa87 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/model/TagRequest.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/model/TagRequest.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.model; +package com.keploy.sapdemo.customer360.model; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Pattern; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/AuditEvent.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/AuditEvent.java similarity index 97% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/AuditEvent.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/AuditEvent.java index c4249248..096afe31 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/AuditEvent.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/AuditEvent.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.persistence; +package com.keploy.sapdemo.customer360.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/CustomerNote.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/CustomerNote.java similarity index 96% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/CustomerNote.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/CustomerNote.java index 8a497fb5..5ccf0783 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/CustomerNote.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/CustomerNote.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.persistence; +package com.keploy.sapdemo.customer360.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/CustomerTag.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/CustomerTag.java similarity index 97% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/CustomerTag.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/CustomerTag.java index fa9564e8..4092c072 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/persistence/CustomerTag.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/persistence/CustomerTag.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.persistence; +package com.keploy.sapdemo.customer360.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/AuditEventRepository.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/AuditEventRepository.java similarity index 75% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/AuditEventRepository.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/AuditEventRepository.java index dc1166a8..ce3263eb 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/AuditEventRepository.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/AuditEventRepository.java @@ -1,6 +1,6 @@ -package com.tricentisdemo.sap.customer360.repository; +package com.keploy.sapdemo.customer360.repository; -import com.tricentisdemo.sap.customer360.persistence.AuditEvent; +import com.keploy.sapdemo.customer360.persistence.AuditEvent; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/CustomerNoteRepository.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/CustomerNoteRepository.java similarity index 75% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/CustomerNoteRepository.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/CustomerNoteRepository.java index c34e5f6d..e62ffab2 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/CustomerNoteRepository.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/CustomerNoteRepository.java @@ -1,6 +1,6 @@ -package com.tricentisdemo.sap.customer360.repository; +package com.keploy.sapdemo.customer360.repository; -import com.tricentisdemo.sap.customer360.persistence.CustomerNote; +import com.keploy.sapdemo.customer360.persistence.CustomerNote; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/CustomerTagRepository.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/CustomerTagRepository.java similarity index 88% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/CustomerTagRepository.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/CustomerTagRepository.java index d47d4a4e..3da67838 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/repository/CustomerTagRepository.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/repository/CustomerTagRepository.java @@ -1,6 +1,6 @@ -package com.tricentisdemo.sap.customer360.repository; +package com.keploy.sapdemo.customer360.repository; -import com.tricentisdemo.sap.customer360.persistence.CustomerTag; +import com.keploy.sapdemo.customer360.persistence.CustomerTag; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/CorrelationIdFilter.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/CorrelationIdFilter.java similarity index 97% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/CorrelationIdFilter.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/CorrelationIdFilter.java index a66e9ad3..00e1178f 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/CorrelationIdFilter.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/CorrelationIdFilter.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.sap; +package com.keploy.sapdemo.customer360.sap; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/CorrelationIdInterceptor.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/CorrelationIdInterceptor.java similarity index 91% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/CorrelationIdInterceptor.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/CorrelationIdInterceptor.java index b8c8198e..7c9aef8b 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/CorrelationIdInterceptor.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/CorrelationIdInterceptor.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.sap; +package com.keploy.sapdemo.customer360.sap; import org.slf4j.MDC; import org.springframework.http.HttpRequest; @@ -12,7 +12,7 @@ /** * Propagates the caller's correlation id into every outbound SAP call. * - *

For incoming requests, {@link com.tricentisdemo.sap.customer360.sap.CorrelationIdFilter} + *

For incoming requests, {@link com.keploy.sapdemo.customer360.sap.CorrelationIdFilter} * seeds the MDC. This interceptor reads it back and sets the * {@code X-Correlation-ID} header on the SAP call so distributed traces * chain across the hop — operationally critical in BTP landscapes where a diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/SapApiException.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/SapApiException.java similarity index 95% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/SapApiException.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/SapApiException.java index 6a6f35e5..6377c323 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/SapApiException.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/SapApiException.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360.sap; +package com.keploy.sapdemo.customer360.sap; import org.springframework.http.HttpStatus; @@ -16,7 +16,7 @@ * * *

The {@link #upstreamStatus} field preserves the exact status SAP returned - * so {@link com.tricentisdemo.sap.customer360.web.GlobalExceptionHandler} + * so {@link com.keploy.sapdemo.customer360.web.GlobalExceptionHandler} * can surface it in an RFC 7807 problem response as * {@code X-Upstream-Status}. Keploy captures this header verbatim in the * replayed mocks, which lets contract-diff checks catch status regressions diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/SapBusinessPartnerClient.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/SapBusinessPartnerClient.java similarity index 95% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/SapBusinessPartnerClient.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/SapBusinessPartnerClient.java index 5afa1ccf..f904a5ff 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/sap/SapBusinessPartnerClient.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/sap/SapBusinessPartnerClient.java @@ -1,12 +1,12 @@ -package com.tricentisdemo.sap.customer360.sap; +package com.keploy.sapdemo.customer360.sap; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import com.tricentisdemo.sap.customer360.model.BusinessPartner; -import com.tricentisdemo.sap.customer360.model.BusinessPartnerAddress; -import com.tricentisdemo.sap.customer360.model.BusinessPartnerRole; -import com.tricentisdemo.sap.customer360.model.ODataCollectionResponse; -import com.tricentisdemo.sap.customer360.model.ODataEntityResponse; +import com.keploy.sapdemo.customer360.model.BusinessPartner; +import com.keploy.sapdemo.customer360.model.BusinessPartnerAddress; +import com.keploy.sapdemo.customer360.model.BusinessPartnerRole; +import com.keploy.sapdemo.customer360.model.ODataCollectionResponse; +import com.keploy.sapdemo.customer360.model.ODataEntityResponse; import io.github.resilience4j.circuitbreaker.annotation.CircuitBreaker; import io.github.resilience4j.retry.annotation.Retry; import org.slf4j.Logger; @@ -41,7 +41,7 @@ * *

The service path is fixed; only the sub-path varies. Base URL is set * on the RestTemplate's rootUri (see - * {@link com.tricentisdemo.sap.customer360.config.SapClientConfig}). + * {@link com.keploy.sapdemo.customer360.config.SapClientConfig}). */ @Component public class SapBusinessPartnerClient { diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/AuditService.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/AuditService.java similarity index 82% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/AuditService.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/AuditService.java index 0a76b123..50e8d8bf 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/AuditService.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/AuditService.java @@ -1,8 +1,8 @@ -package com.tricentisdemo.sap.customer360.service; +package com.keploy.sapdemo.customer360.service; -import com.tricentisdemo.sap.customer360.persistence.AuditEvent; -import com.tricentisdemo.sap.customer360.repository.AuditEventRepository; -import com.tricentisdemo.sap.customer360.sap.CorrelationIdInterceptor; +import com.keploy.sapdemo.customer360.persistence.AuditEvent; +import com.keploy.sapdemo.customer360.repository.AuditEventRepository; +import com.keploy.sapdemo.customer360.sap.CorrelationIdInterceptor; import org.slf4j.MDC; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/Customer360AggregatorService.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/Customer360AggregatorService.java similarity index 90% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/Customer360AggregatorService.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/Customer360AggregatorService.java index 765d2b74..8eab1063 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/Customer360AggregatorService.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/Customer360AggregatorService.java @@ -1,14 +1,14 @@ -package com.tricentisdemo.sap.customer360.service; - -import com.tricentisdemo.sap.customer360.model.BusinessPartner; -import com.tricentisdemo.sap.customer360.model.BusinessPartnerAddress; -import com.tricentisdemo.sap.customer360.model.BusinessPartnerRole; -import com.tricentisdemo.sap.customer360.model.Customer360View; -import com.tricentisdemo.sap.customer360.persistence.CustomerNote; -import com.tricentisdemo.sap.customer360.persistence.CustomerTag; -import com.tricentisdemo.sap.customer360.sap.CorrelationIdInterceptor; -import com.tricentisdemo.sap.customer360.sap.SapApiException; -import com.tricentisdemo.sap.customer360.sap.SapBusinessPartnerClient; +package com.keploy.sapdemo.customer360.service; + +import com.keploy.sapdemo.customer360.model.BusinessPartner; +import com.keploy.sapdemo.customer360.model.BusinessPartnerAddress; +import com.keploy.sapdemo.customer360.model.BusinessPartnerRole; +import com.keploy.sapdemo.customer360.model.Customer360View; +import com.keploy.sapdemo.customer360.persistence.CustomerNote; +import com.keploy.sapdemo.customer360.persistence.CustomerTag; +import com.keploy.sapdemo.customer360.sap.CorrelationIdInterceptor; +import com.keploy.sapdemo.customer360.sap.SapApiException; +import com.keploy.sapdemo.customer360.sap.SapBusinessPartnerClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.MDC; @@ -47,8 +47,8 @@ * *

That's the full story for Keploy: every call on the request path — * HTTP and Postgres wire-protocol — is visible to eBPF on the host and - * gets captured into the replay mocks. Tosca can only assert on the - * rendered tile; Keploy sees all six backend conversations. + * gets captured into the replay mocks. UI test suites can only assert on + * the rendered tile; Keploy sees all six backend conversations. * *

Partial-failure policy: the SAP partner fetch is mandatory. * Everything else (addresses, roles, tags, notes) is optional — failure diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/CustomerService.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/CustomerService.java similarity index 82% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/CustomerService.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/CustomerService.java index 21f03aef..524c34e8 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/CustomerService.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/CustomerService.java @@ -1,8 +1,8 @@ -package com.tricentisdemo.sap.customer360.service; +package com.keploy.sapdemo.customer360.service; -import com.tricentisdemo.sap.customer360.model.BusinessPartner; -import com.tricentisdemo.sap.customer360.model.CustomerSummary; -import com.tricentisdemo.sap.customer360.sap.SapBusinessPartnerClient; +import com.keploy.sapdemo.customer360.model.BusinessPartner; +import com.keploy.sapdemo.customer360.model.CustomerSummary; +import com.keploy.sapdemo.customer360.sap.SapBusinessPartnerClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/NoteService.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/NoteService.java similarity index 84% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/NoteService.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/NoteService.java index 8782f786..756b6dc0 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/NoteService.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/NoteService.java @@ -1,7 +1,7 @@ -package com.tricentisdemo.sap.customer360.service; +package com.keploy.sapdemo.customer360.service; -import com.tricentisdemo.sap.customer360.persistence.CustomerNote; -import com.tricentisdemo.sap.customer360.repository.CustomerNoteRepository; +import com.keploy.sapdemo.customer360.persistence.CustomerNote; +import com.keploy.sapdemo.customer360.repository.CustomerNoteRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/TagService.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/TagService.java similarity index 91% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/TagService.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/TagService.java index c988c5b7..2072efbc 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/service/TagService.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/service/TagService.java @@ -1,7 +1,7 @@ -package com.tricentisdemo.sap.customer360.service; +package com.keploy.sapdemo.customer360.service; -import com.tricentisdemo.sap.customer360.persistence.CustomerTag; -import com.tricentisdemo.sap.customer360.repository.CustomerTagRepository; +import com.keploy.sapdemo.customer360.persistence.CustomerTag; +import com.keploy.sapdemo.customer360.repository.CustomerTagRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.dao.DataIntegrityViolationException; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/AuditController.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/AuditController.java similarity index 88% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/AuditController.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/AuditController.java index a46021bc..307f3428 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/AuditController.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/AuditController.java @@ -1,7 +1,7 @@ -package com.tricentisdemo.sap.customer360.web; +package com.keploy.sapdemo.customer360.web; -import com.tricentisdemo.sap.customer360.persistence.AuditEvent; -import com.tricentisdemo.sap.customer360.service.AuditService; +import com.keploy.sapdemo.customer360.persistence.AuditEvent; +import com.keploy.sapdemo.customer360.service.AuditService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.slf4j.Logger; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/CustomerController.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/CustomerController.java similarity index 90% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/CustomerController.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/CustomerController.java index a2bce19e..a96162dc 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/CustomerController.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/CustomerController.java @@ -1,10 +1,10 @@ -package com.tricentisdemo.sap.customer360.web; +package com.keploy.sapdemo.customer360.web; -import com.tricentisdemo.sap.customer360.model.BusinessPartner; -import com.tricentisdemo.sap.customer360.model.Customer360View; -import com.tricentisdemo.sap.customer360.model.CustomerSummary; -import com.tricentisdemo.sap.customer360.service.Customer360AggregatorService; -import com.tricentisdemo.sap.customer360.service.CustomerService; +import com.keploy.sapdemo.customer360.model.BusinessPartner; +import com.keploy.sapdemo.customer360.model.Customer360View; +import com.keploy.sapdemo.customer360.model.CustomerSummary; +import com.keploy.sapdemo.customer360.service.Customer360AggregatorService; +import com.keploy.sapdemo.customer360.service.CustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.constraints.Max; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/GlobalExceptionHandler.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/GlobalExceptionHandler.java similarity index 96% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/GlobalExceptionHandler.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/GlobalExceptionHandler.java index bbdaa00c..3d889e13 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/GlobalExceptionHandler.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/GlobalExceptionHandler.java @@ -1,8 +1,8 @@ -package com.tricentisdemo.sap.customer360.web; +package com.keploy.sapdemo.customer360.web; -import com.tricentisdemo.sap.customer360.model.ProblemResponse; -import com.tricentisdemo.sap.customer360.sap.CorrelationIdInterceptor; -import com.tricentisdemo.sap.customer360.sap.SapApiException; +import com.keploy.sapdemo.customer360.model.ProblemResponse; +import com.keploy.sapdemo.customer360.sap.CorrelationIdInterceptor; +import com.keploy.sapdemo.customer360.sap.SapApiException; import io.github.resilience4j.circuitbreaker.CallNotPermittedException; import jakarta.servlet.http.HttpServletRequest; import jakarta.validation.ConstraintViolationException; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/NoteController.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/NoteController.java similarity index 89% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/NoteController.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/NoteController.java index ea5e912a..dca39005 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/NoteController.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/NoteController.java @@ -1,9 +1,9 @@ -package com.tricentisdemo.sap.customer360.web; +package com.keploy.sapdemo.customer360.web; -import com.tricentisdemo.sap.customer360.model.NoteRequest; -import com.tricentisdemo.sap.customer360.persistence.CustomerNote; -import com.tricentisdemo.sap.customer360.service.AuditService; -import com.tricentisdemo.sap.customer360.service.NoteService; +import com.keploy.sapdemo.customer360.model.NoteRequest; +import com.keploy.sapdemo.customer360.persistence.CustomerNote; +import com.keploy.sapdemo.customer360.service.AuditService; +import com.keploy.sapdemo.customer360.service.NoteService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/TagController.java b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/TagController.java similarity index 91% rename from sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/TagController.java rename to sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/TagController.java index a0c44120..8609bcad 100644 --- a/sap-demo-java/src/main/java/com/tricentisdemo/sap/customer360/web/TagController.java +++ b/sap-demo-java/src/main/java/com/keploy/sapdemo/customer360/web/TagController.java @@ -1,9 +1,9 @@ -package com.tricentisdemo.sap.customer360.web; +package com.keploy.sapdemo.customer360.web; -import com.tricentisdemo.sap.customer360.model.TagRequest; -import com.tricentisdemo.sap.customer360.persistence.CustomerTag; -import com.tricentisdemo.sap.customer360.service.AuditService; -import com.tricentisdemo.sap.customer360.service.TagService; +import com.keploy.sapdemo.customer360.model.TagRequest; +import com.keploy.sapdemo.customer360.persistence.CustomerTag; +import com.keploy.sapdemo.customer360.service.AuditService; +import com.keploy.sapdemo.customer360.service.TagService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/sap-demo-java/src/main/resources/application.yml b/sap-demo-java/src/main/resources/application.yml index 5356a1fb..71de8051 100644 --- a/sap-demo-java/src/main/resources/application.yml +++ b/sap-demo-java/src/main/resources/application.yml @@ -97,7 +97,7 @@ resilience4j: - org.springframework.web.client.ResourceAccessException - java.net.SocketTimeoutException ignore-exceptions: - - com.tricentisdemo.sap.customer360.sap.SapApiException + - com.keploy.sapdemo.customer360.sap.SapApiException circuitbreaker: instances: sapApi: @@ -174,5 +174,5 @@ springdoc: logging: level: root: INFO - com.tricentisdemo.sap: INFO + com.keploy.sapdemo: INFO org.springframework.web: INFO diff --git a/sap-demo-java/src/test/java/com/tricentisdemo/sap/customer360/Customer360ApplicationTests.java b/sap-demo-java/src/test/java/com/keploy/sapdemo/customer360/Customer360ApplicationTests.java similarity index 96% rename from sap-demo-java/src/test/java/com/tricentisdemo/sap/customer360/Customer360ApplicationTests.java rename to sap-demo-java/src/test/java/com/keploy/sapdemo/customer360/Customer360ApplicationTests.java index 89ab53f5..a22292c8 100644 --- a/sap-demo-java/src/test/java/com/tricentisdemo/sap/customer360/Customer360ApplicationTests.java +++ b/sap-demo-java/src/test/java/com/keploy/sapdemo/customer360/Customer360ApplicationTests.java @@ -1,4 +1,4 @@ -package com.tricentisdemo.sap.customer360; +package com.keploy.sapdemo.customer360; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest;