• Coupling and Lack of Boundaries
• Team’s Autonomy
• Release Cycle
• Scaling
• Reliability
• Outdated Technology Stack
xxxxxxxxxx
@PostMapping("/myCustomerDetails")
@CircuitBreaker(name = "detailsForCustomerSupportApp",fallbackMethod="myCustomerDetailsFallBack")
@Retry(name = "retryForCustomerDetails", fallbackMethod = "myCustomerDetailsFallBack")
public CustomerDetails myCustomerDetails(@RequestHeader("eazybank-correlation-id") String correlationid,@RequestBody Customer customer) {
logger.info("myCustomerDetails() method started");
Accounts accounts = accountsRepository.findByCustomerId(customer.getCustomerId());
List<Loans> loans = loansFeignClient.getLoansDetails(correlationid,customer);
List<Cards> cards = cardsFeignClient.getCardDetails(correlationid,customer);
CustomerDetails customerDetails = new CustomerDetails();
customerDetails.setAccounts(accounts);
customerDetails.setLoans(loans);
customerDetails.setCards(cards);
logger.info("myCustomerDetails() method ended");
return customerDetails;
}
private CustomerDetails myCustomerDetailsFallBack(@RequestHeader("eazybank-correlation-id") String correlationid,Customer customer, Throwable t) {
Accounts accounts = accountsRepository.findByCustomerId(customer.getCustomerId());
List<Loans> loans = loansFeignClient.getLoansDetails(correlationid,customer);
CustomerDetails customerDetails = new CustomerDetails();
customerDetails.setAccounts(accounts);
customerDetails.setLoans(loans);
return customerDetails;
}
@GetMapping("/sayHello")
@RateLimiter(name = "sayHello", fallbackMethod = "sayHelloFallback")
public String sayHello() {
Optional<String> podName = Optional.ofNullable(System.getenv("HOSTNAME"));
return "Hello, Welcome to EazyBank Kubernetes cluster from : "+(podName.isPresent()?podName.get():"");
}
https://www.freeprojectz.com/java-spring-boot-angular-project-source-code