I have a room service which returns detail for rooms when requesting http://localhost:8082/room/search/byRoomChar Now I want to request this @GetMapping from the booking service since this is the application gateway that users are going to interact with using the http://localhost:8081/booking/search/byRoomCha…
Tag: microservices
whitelabel error page 404 spring boot microservices Rest Controller
I am new to Spring Boot and Microservices. I have created RestController and tried to check using RequestMapping test but it give us error as 404, whitelabel error page. Below is pom.xml : Below is the code for the controller Below is Spring boot main class Server Start up logs are mentioned below : Any help …
Spring POST Method Microservice 500 exception
So, im trying to write a microservice with basic GET POST PUT DELETE commands. Its a Spring Maven Java programm with a mysql server When I try to post something it works, however if I dont include the Id it returns an exception: This is weird, because in the mysql console I can Insert a customer without the i…
Communicate between microservices on the same machine without exposing a public API
I am relatively new to Camel and Spring, and I am making a service to predict stock prices using a neural network to practise using Camel, Spring and also DL4J. My service is divided into 5 microservices (Gateway, H2 SQL Database, Admin Console, Data Fetcher, DL4J Handler) which will each run in their own Jav…
RedisTemplate mock is only working in the test class
Class B Now when I am writing the test for method in class B i.e. someMethod(). I have observed that the redis template mock is generating in test class but not in Class A and class B Inside ClassBTest Inside class B Why is the mock not working in class B and A ? Answer My issue is resolved now.
Multiple RestTemplate calls for each Id in a List
I need to make multiple RestTemplate calls for each of the Id in a List<Ids>. What is the best way to perform this? I have used parallelStream(). Below code snippet is a similar scenario. employeeService.fetchEmployeedetails is a kind of restCall which will fetch all the employeeDetails. Is there any ot…
Uni.combine().all().unis() v.s. Multi..onItem().transformToMultiAndConcatenate().collect()
In my Quarkus service, I need to fetch a list of results from external service, and I figured out there are two methods to achieve the same goal: 1st approach based on Uni.combine().all(): 2nd approach based on Multi..onItem().transformToMultiAndConcatenate().collect() In the beginning I don’t think the…
What is the best practice to make microservice aware about name of another microservice for interaction
I have couple of microservices written in spring boot which interact with each other to perform certain task. I need to deploy these microservices in AWS using Kubernetes. In order for microservices to interact with each other, one service need to know the name of other service. This is where I am not sure ho…
Making a Spring Boot Configuration Fault Tolerant [closed]
I have a Spring Boot Application that relies on various services like Keycloak, Elastic Stack, and PostgreSQL. This application will be deployed to an Kubernetes cluster along with a number of other …