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

Sdílet
Vložit
  • čas přidán 11. 04. 2024
  • 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

Komentáře • 25

  • @ProgrammingTechie
    @ProgrammingTechie  Před 3 měsíci

    Link to the written tutorial: programmingtechie.com/2024/04/03/spring-boot-microservices-tutorial-part-2/

  • @nailtagiyev6340
    @nailtagiyev6340 Před 3 měsíci

    Waiting for the next video

  • @GopalaKrishna-ns2lb
    @GopalaKrishna-ns2lb Před 3 měsíci

    waiting for more vedios on Spring Boot Microservices Tutorial's

  • @danielsundersingh1
    @danielsundersingh1 Před 11 dny

    Why is the mysql test container initialized in a static block instead of inside a @BeforeAll method?

  • @user-cz4fw7ls8m
    @user-cz4fw7ls8m Před měsícem

    Hi Sai , Can we try to implement asynchronous communication in this setup by referring to your previous microservices tutorial?

  • @diptapanda8192
    @diptapanda8192 Před měsícem +1

    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

  • @sanketkadam4716
    @sanketkadam4716 Před 3 měsíci +1

    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  Před 3 měsíci

      Yes I am already working on it, the new videos will have increased font

  • @waterfire2640
    @waterfire2640 Před 3 měsíci +1

    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 Před 3 měsíci +1

      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 Před 3 měsíci

      @@raghavanaliassaravananm1546 Yeah, maybe i was too focused on re-use code problem.

  • @Rajnish089
    @Rajnish089 Před 3 měsíci

    When are you launching your course?

    • @ProgrammingTechie
      @ProgrammingTechie  Před 3 měsíci

      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.

  • @aadiraj6126
    @aadiraj6126 Před 3 měsíci

    Which K8s we are going to use? I mean EKS, ECS, GKE, AKS, Kubeadm in EC2, microK8s, etc?

    • @ProgrammingTechie
      @ProgrammingTechie  Před 3 měsíci

      I won't be deploying to Cloud, only on local kubernetes cluster

  • @ayusharyan2165
    @ayusharyan2165 Před 3 měsíci

    I think we missed a part here, after placing an order we must subtract the inventory item against that skuCode.

    • @ProgrammingTechie
      @ProgrammingTechie  Před 3 měsíci

      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 Před 3 měsíci

      @@ProgrammingTechie Yes, I get it. Thank you so much. I'm already learning a lot through it.

  • @tusharrai9762
    @tusharrai9762 Před 2 měsíci

    did you bought the IntelliJ ultimate

  • @vind190
    @vind190 Před 24 dny

    java.sql.SQLException: Access denied for user 'root'@'172.24.0.1' (using password: YES)
    How to fix this issue?

  • @mateuslevi1300
    @mateuslevi1300 Před 2 měsíci

    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  Před 2 měsíci

      Is this happening only while running the tests or also while running the application locally ?

    • @mateuslevi1300
      @mateuslevi1300 Před 2 měsíci

      @@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