Spring Boot Microservices Tutorial - Part 4 - Spring Cloud OpenFeign & Testing with Wiremock

  Рет қаралды 6,415

Programming Techie

Programming Techie

Күн бұрын

In this Spring Boot 3 Microservices tutorial series, we will learn how to build microservices using Spring Boot and Spring Cloud.
This is part 4 of the series, in this part, we will cover:
- Integrating Synchronous Communication using Spring Cloud OpenFeign
- Write Integration Tests using Wire mock

Пікірлер: 27
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
Link to the written tutorial: programmingtechie.com/2024/04/03/spring-boot-microservices-tutorial-part-2/
@GopalaKrishna-ns2lb
@GopalaKrishna-ns2lb 4 ай бұрын
waiting for more vedios on Spring Boot Microservices Tutorial's
@sanketkadam4716
@sanketkadam4716 4 ай бұрын
Thanks for the videos, please increase the font size of code and change the background of IDE bcoz code is not visible properly.
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
Yes I am already working on it, the new videos will have increased font
@nailtagiyev6340
@nailtagiyev6340 4 ай бұрын
Waiting for the next video
@user-cz4fw7ls8m
@user-cz4fw7ls8m 2 ай бұрын
Hi Sai , Can we try to implement asynchronous communication in this setup by referring to your previous microservices tutorial?
@diptapanda8192
@diptapanda8192 2 ай бұрын
the order-service starts up fine but running the post query on postman gives me a error code 500: "java.net.ConnectException: Connection refused: no further information" i tried changing the ports but still not able to fix the issue
@supremeleader7695
@supremeleader7695 17 күн бұрын
I am facing the same issue, Did you get any solution for this?
@waterfire2640
@waterfire2640 4 ай бұрын
I have the question: If we have four services A, B, C, D in our project and B, C, D services needs to call API of A service. So, we need to define Feign client for service A in B, C, D services and that is duplicate 3 times, right? Is there anyway to define Feign client for A service one time only and it can be shared among 3 services B, C, D?
@raghavanaliassaravananm1546
@raghavanaliassaravananm1546 4 ай бұрын
Yes it is because that’s a contract of each service . How come it becomes duplicate if these are supposed to be loosely coupled , independently deployed units ? Think in that way !
@waterfire2640
@waterfire2640 4 ай бұрын
@@raghavanaliassaravananm1546 Yeah, maybe i was too focused on re-use code problem.
@vind190
@vind190 Ай бұрын
java.sql.SQLException: Access denied for user 'root'@'172.24.0.1' (using password: YES) How to fix this issue?
@ayusharyan2165
@ayusharyan2165 4 ай бұрын
I think we missed a part here, after placing an order we must subtract the inventory item against that skuCode.
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
Yes as I mentioned in the course, I won't cover all the use cases, but I was planning to give this task as an exercise after the Event Driven Microservices tutorial is out. Basically when the order is placed we can send out an event through Kafka, the inventory service then listens to this message and then subtracts the inventory. Of course in the real world this is much more complex but again we are only learning about microservices here not building a full blown e-commerce system!
@ayusharyan2165
@ayusharyan2165 4 ай бұрын
@@ProgrammingTechie Yes, I get it. Thank you so much. I'm already learning a lot through it.
@danielsundersingh1
@danielsundersingh1 Ай бұрын
Why is the mysql test container initialized in a static block instead of inside a @BeforeAll method?
@Hemant._.Dhiman
@Hemant._.Dhiman 13 күн бұрын
I thinks its suggested by name of the annotation Before all, it will executed piece of code before each test run. And on other hand static block get executed only once before the main method execution.( its a traditional way of initialising the bean, vars, objects etc).
@aadiraj6126
@aadiraj6126 4 ай бұрын
Which K8s we are going to use? I mean EKS, ECS, GKE, AKS, Kubeadm in EC2, microK8s, etc?
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
I won't be deploying to Cloud, only on local kubernetes cluster
@tusharrai9762
@tusharrai9762 3 ай бұрын
did you bought the IntelliJ ultimate
@ProgrammingTechie
@ProgrammingTechie 3 ай бұрын
Yes I have ultimate edition
@Rajnish089
@Rajnish089 4 ай бұрын
When are you launching your course?
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
Unfortunately I cannot provide you the date yet, please subscribe to the waitlist to get updates about the release date when it's ready. You can find the link to it in the Community Post.
@mateuslevi1300
@mateuslevi1300 4 ай бұрын
I had set the line server.servlet.context-path=/api in my main .properties file. However, when running the tests and configuring them to handle WireMock, it was giving the following error: { "type": "about:blank", "title": "Not Found", "status": 404, "detail": "No static resource api/order.", "instance": "/api/order" } java.lang.AssertionError: 1 expectation failed. Expected status code but was . I removed the line from the properties file and added @RequestMapping("/api/order"). i was using just /order. to the controller, and it worked. Do you know why? Since there isn't much difference.
@ProgrammingTechie
@ProgrammingTechie 4 ай бұрын
Is this happening only while running the tests or also while running the application locally ?
@mateuslevi1300
@mateuslevi1300 3 ай бұрын
@@ProgrammingTechie while running tests. As I said, I removed the context path in the .properties file and set the path to /api/order in the controller as usual, and it worked. Before dealing with the OpenFeign issue, the tests were running smoothly, but it worked. need to check later what might be causing this problem. That said, your content is excellent
Spring Boot Microservices Tutorial - Part 5 - Spring Cloud Gateway MVC
13:17
5 Rules For DTOs
17:56
Ardalis
Рет қаралды 40 М.
Fortunately, Ultraman protects me  #shorts #ultraman #ultramantiga #liveaction
00:10
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 18 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 159 МЛН
Watch Me Code a Retryable Feign Client with Java Spring
25:50
Tech Tutor
Рет қаралды 1,9 М.
Spring Boot APIs Gateway in 20 Minutes
22:50
The IT Wizard
Рет қаралды 10 М.
Microservices using SpringBoot 3.0 | Full Example [NEW]
1:25:38
Daily Code Buffer
Рет қаралды 179 М.
Spring Tips: Spring Modulith
37:39
SpringDeveloper
Рет қаралды 22 М.
Learn About Feign Clients Using Java Spring in 15 minutes
16:02
Tech Tutor
Рет қаралды 18 М.
Handle 1,000,000 Threads with Java and Spring Boot !!!
21:50
Daily Code Buffer
Рет қаралды 22 М.
Top 25 Microservice Interview Questions Answered - Java Brains
39:54
Spring Boot Rest Client Interceptors
14:00
Dan Vega
Рет қаралды 9 М.
Fortunately, Ultraman protects me  #shorts #ultraman #ultramantiga #liveaction
00:10