How nalder23/ejercicios works
Purpose and Runtime
This is a Java Spring Boot transaction-orchestration API for BREB/Neurona flows. It exposes HTTP endpoints to initiate and manage fund security, fund return, pledge confirmation, and transaction-core notification operations. Application entry points support both executable Spring Boot and servlet-container deployment:
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/SendTrxApplication.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/ServletInitializer.java
HTTP API Boundary
SendTrxController implements the public controller contract and is the inbound boundary between client request DTOs and application services. Request/context models carry transaction, audit, device, office, agent, and service-point metadata.
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/controller/ISendTrxController.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/controller/SendTrxController.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/dto/in/ContextTransaction.java
Transaction Orchestration
SendTrxServiceImpl is the central application-service layer behind the controller. It coordinates transaction-specific implementations and maps inbound API payloads to downstream request/response contracts. The operation classes separate the principal financial workflows: secure funds, return funds, pledge confirmation, and core notification.
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/ISendTrxService.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/SendTrxServiceImpl.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/SecureFunds.java
Downstream Integration Boundary
Outbound calls are isolated behind an API-client service and Spring WebClient configuration. Dedicated DTO namespaces define wire contracts for admin transactions, customer lookup, savings-account operations, notifications, and the send-transaction API, preventing those external schemas from becoming the public HTTP model.
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/ApiClientServiceImpl.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/config/WebClientConfig.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/dto/admintrx/in
Credentials and Token Lifecycle
Authentication material is obtained through a secret-management implementation, then acquired and cached through token services before outbound integration calls. This is a material operational boundary: runtime configuration must provide both downstream endpoints and secret/token settings.
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/SecretManagerImpl.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/TokenService.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/TokenCacheService.java
Audit, Errors, and Responses
Audit services and logging utilities track processing activity around transaction execution. A global exception handler converts domain failures—bad requests, missing resources, timeouts, and internal failures—into consistent API response DTOs rather than leaking integration errors across the HTTP boundary.
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/AuditServiceImpl.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/exception/GlobalExceptionHandler.java
• srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/dto/exception/ApiErrorResponse.java
Deployment and Configuration
The service is containerized and has Docker Compose support. Kubernetes manifests define service, deployment, ingress, and ConfigMap resources for AWS-oriented environments, with parallel production manifests. Spring profile property files provide local, QA, and production runtime configuration; Swagger configuration indicates API documentation support.
• srvapisendtrxbrebneurona-dev/Dockerfile
• srvapisendtrxbrebneurona-dev/deployment-aws.yml
• srvapisendtrxbrebneurona-dev/src/main/resources/application-prd.properties
Main entry points: SendTrxController.java SendTrx controller · ApiClientServiceImpl.java API client service · SendTrxApplication.java Spring Boot application · SendTrxServiceImpl.java SendTrx service
Components 18
Runtime
- Spring Boot application · Supports executable application startup.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/SendTrxApplication.java - Servlet initializer · Enables servlet-container deployment.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/ServletInitializer.java
HTTP API
- Controller contract
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/controller/ISendTrxController.java - SendTrx controller
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/controller/SendTrxController.java - Transaction context · Carries transaction, audit, device, office, agent, and service-point data.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/dto/in/ContextTransaction.java - Global exception handler · Maps domain and integration failures to API errors.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/exception/GlobalExceptionHandler.java - API error response
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/dto/exception/ApiErrorResponse.java
Transaction orchestration
- SendTrx service · Maps API payloads and coordinates transaction flows.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/SendTrxServiceImpl.java - Financial operations · Secure funds, return funds, pledge confirmation, and core notification.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/SecureFunds.java - Audit service
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/AuditServiceImpl.java
Outbound integration
- API client service · Owns downstream request and response contracts.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/ApiClientServiceImpl.java - WebClient configuration
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/config/WebClientConfig.java - Token service · Acquires tokens for downstream calls.
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/TokenService.java - Token cache
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/TokenCacheService.java - Secret manager
srvapisendtrxbrebneurona-dev/src/main/java/com/bun/sendtrxbrebneurona/service/impl/SecretManagerImpl.java - BREB / Neurona services · Admin transaction, customer, savings, and notification endpoints.
Deployment
- Container and Kubernetes deployment · Docker image and AWS Kubernetes manifests deploy the service.
srvapisendtrxbrebneurona-dev/Dockerfile - Production properties · Supplies downstream endpoint and secret/token settings.
srvapisendtrxbrebneurona-dev/src/main/resources/application-prd.properties
Connections 17
- Spring Boot application → SendTrx controller: starts HTTP API
- Servlet initializer → Spring Boot application: boots in container
- Controller contract → SendTrx controller: implemented by
- Transaction context → SendTrx controller: request payload
- SendTrx controller → SendTrx service: delegates requests
- SendTrx controller → Global exception handler: failures handled by
- Global exception handler → API error response: returns
- SendTrx service → Financial operations: selects workflow
- SendTrx service → Audit service: records activity
- Financial operations → API client service: executes downstream actions
- API client service → WebClient configuration: uses
- API client service → Token service: requests authorization
- Token service → Token cache: caches tokens
- Token service → Secret manager: obtains credentials
- API client service → BREB / Neurona services: calls
- Production properties → Spring Boot application: configures runtime
- Container and Kubernetes deployment → Spring Boot application: packages and deploys