Write Your First Microservice Using Java and Spring Boot | Java microservices | REST API

Поділитися
Вставка
  • Опубліковано 8 лип 2024
  • In this lesson, you will Write Your First Microservice Using Java and Spring Boot . We will use REST API (Spring REST) , Spring Boot, ModelMapper, Spring Boot Data JPA, MYSQL in our tech stack today.
    As I said you guys in our earlier lesson, The spring cloud helps us solving different problem/challenges that we usually face in java microservices. But Before we understand those challenges, we got to build some Microservices.
    So Let’s Build two of them.
    Note that you should have Spring REST, Spring Boot and Spring DATA as the prerequisite before proceeding with this lesson. I will not explain Spring Web MVC or Spring REST related things.
    My main goal will be to develop couple of Microservices so that I can start teaching you spring cloud and spring microservices.
    Resources :
    If you are new to Spring , please check my spring core, spring mvc, spring mvc intermediate, spring jdbc,spring security playlist on this channel.They all are FREE FULL COURSE and you need them as prerequisite.
    If you already have some spring basics, You can take the below paid course On Spring Framework to enhance your skill set.
    www.seleniumexpress.com/cours...
    This Lesson, is part of my Spring boot advanced + Microservices Bootcamp
    www.seleniumexpress.com/cours...
    Timestamp
    00:00:00 - Prerequisites and Intro
    00:06:08 - Building Employee Service using Spring Boot
    00:09:44 - DB(MYSQL) Table Creation
    00:12:46 - Writing Employee RESTController
    00:27:06 - Introducing Modelmapper
    00:42:57 - Address Microservice Development using Spring Boot and Spring REST
    00:56:55 - Spring Boot Custom native Query
    00:11:50 - QNA / Doubt Discussion
    #JavaMicroservices #SpringBoot #SpringCloud
    In this series of Sessions we will learn to create Microservices using spring boot and We will Implement spring cloud to resolve the known challenges during MS development.
    This course will get you started with Microservices, for in-depth Microservices hands-on you can check out the below paid course : Course Name : Spring Boot Advanced + Microservices Bootcamp (Running Batch)Mode : Live / Self-Paced
    www.seleniumexpress.com/cours...
    #Microservices #SpringBoot #SpringCloud #java
    For more free / paid courses visit
    www.seleniumexpress.com
    LINKS AND FREE LEARNING RESOURCES
    ========
    Watch my new mock interview series for java developers
    • Java interview questio...
    Watch Spring boot Hot topics
    • @Reposicotry Vs @Servi...
    Java Interview / Question and Answer series
    • Java collections inter...
    Explain spring Bean Lifecycle
    • REAL-TIME: Spring Bean...
    spring core
    • Spring framework tutor...
    spring mvc
    • Spring MVC course intr...
    spring mvc intermediate
    • [INTERMEDIATE] Spring ...
    Spring JDBC
    • Spring JDBC Course Pre...
    spring live project
    • #1 Build and Deploy A ...
    SPRING SECURITY COURSE[NEW]
    • Spring Security Course...
    For more courses visit
    www.seleniumexpress.com
    Any time you are getting stuck with issues, Feel free to ask for support.
    You can send mail to seleniumexpress@gmail.com
    you can ping me on my Facebook page
    / seleniumexpress
    Make sure to join my private Facebook page (Ask me here)
    “SeleniumExpress - Support"
    / 187000222361579
    you can ask for support in my website forum
    www.seleniumexpress.com
    Subscribe to my youtube channel
    / @seleniumexpress
    Follow me on Insta
    / selenium_express
    Music :
    -----
    credits: -
    (channel intro)
    Adventures by A Himitsu / a-himitsu
    Creative Commons - Attribution 3.0 Unported- CC BY 3.0
    creativecommons.org/licenses/b...
    Music released by Argofox • A Himitsu - Adventures...
    Music provided by Audio Library • Adventures - A Himitsu...

КОМЕНТАРІ • 84

  • @ramkumarreddy4295
    @ramkumarreddy4295 Рік тому +17

    Instead of additional dependency for modelmapper, there is BeanUtils class which is part of spring framework it provides copy method for copying properties from one object to another object

    • @SeleniumExpress
      @SeleniumExpress  Рік тому +8

      Pinned this comment. If anyone is reading this, here is another way how you could copy properties. It's another go to approach.

  • @kirangajul6782
    @kirangajul6782 Рік тому +9

    The most underrated channel sir, I really wish your channel grow faster and faster. It should be reaching more than a half million now already.

  • @htetoowaiyan723
    @htetoowaiyan723 11 місяців тому +2

    As a beginner, the way you teaching is best and easiest way for me to understand the microservices. Thank you so much for this.

  • @krishnakittu3266
    @krishnakittu3266 Рік тому +8

    Please start series of solving hackers ranking questions :)

  • @gundrachandrasekharreddy8011
    @gundrachandrasekharreddy8011 Рік тому +4

    Thank you abhilash....! . I haven't seen this kind of clean and good content presentation anywhere. It was a great learning experience. Thank you once again and keep it up.

  • @KarthiKeyan-re1uh
    @KarthiKeyan-re1uh Рік тому +2

    Most waiting video 😍😍

  • @mohammedmoosamr4052
    @mohammedmoosamr4052 Рік тому +2

    Eagerly waiting for micro services series thanks 🙏 bro. This complete series is on UA-cam

  • @ebin44
    @ebin44 11 місяців тому +1

    Marvelous way of teaching 👍

  • @aw703
    @aw703 Рік тому +3

    Thanks sir for the videos sir. Please release the videos regularly so that we can enhance our skill

  • @manamohansamal1040
    @manamohansamal1040 Рік тому +1

    There is a implicit class called BeanUtils provided by spring as well to map property from entity to models.

  • @tasteanotherbite1265
    @tasteanotherbite1265 Рік тому +1

    A great explanation. Really helpful.

  • @SonalGupta25
    @SonalGupta25 Рік тому +2

    Also, we can use MapStruct (which automates the process of creating a mapper to map data objects with model objects using annotation) .

  • @vakkalahari5449
    @vakkalahari5449 Рік тому +1

    This channel must and should grow more, I request you everyone please share Abhilash videos.

  • @harshhwardhanrai3716
    @harshhwardhanrai3716 Рік тому +1

    4.:52 thank god she asked that question, I was having the same doubt as well.

  • @rohitsachdeva4624
    @rohitsachdeva4624 Рік тому +1

    your courses are good just a suggestion also include the error handling scenarios for the people who are new to this can get along with other things also.

  • @manish_55
    @manish_55 2 місяці тому

    sir ur background music get me chill when my overloaded by ur lecture

  • @mansinghyadav548
    @mansinghyadav548 Рік тому +1

    Thank you soo much sir. We love you sir

  • @eswarsai9333
    @eswarsai9333 7 місяців тому +1

    Hi Abhilash, kudos for providing this kind of content on UA-cam.
    I request you to make a tutorial on junit/mocking when u get free time
    Thanks in advance 😊

  • @sagarghodake9289
    @sagarghodake9289 Рік тому +1

    Thank you abhilash....! can you make video on merging 2 APi calls to 2 different micro-services (each having their own db copy) as one using say GrpahQl or CQRS in this series

  • @ainigma100
    @ainigma100 Рік тому +1

    Thank you for the great video! Is it possible to use h2-database with microservices (not in Production. Only during development). Assume that I load the database from a file and not from the memory. How am I going to set the relationship between Employee Service and Address Service (1 to 1) if they are actually a different application? Can I do something like this or it is impossible to do with an H2 database? Thank you in advance!

  • @MohammadShoaibgamerzone
    @MohammadShoaibgamerzone Рік тому +2

    Just curious as to why @Data was not used and manually @Getter @setter were used in entity class .

  • @maniteja5215
    @maniteja5215 Рік тому +5

    Love your videos ❤️ eagerly waiting.
    I have a doubt, which frontend framework goes good with springboot(react or angular)

    • @SeleniumExpress
      @SeleniumExpress  Рік тому +1

      Thanks Mani for the kind words. ❤️
      You can choose any one of it for learning. Once you have a project assigned, the you can work on whatever that comes in your way.

  • @weilichen2961
    @weilichen2961 11 місяців тому +1

    Can you please make a video on geting a list of employees? using the spring boot 3 ListCrudRepository? thanks in advance

  • @varatharajvenkat4817
    @varatharajvenkat4817 Рік тому +1

    Abilash your videos very use full for all.please try to upload the source code.

  • @aibardulatov
    @aibardulatov 5 місяців тому

    I am so confused in databases. Before you said that in microservices architecture, each service has separate database. But here you make common database for address and employee service. Maybe you will tell us how to join tables, when services has own database?

  • @start1learn-n171
    @start1learn-n171 Рік тому

    Tq

  • @pallavajhulayaswanthmanika7319
    @pallavajhulayaswanthmanika7319 7 місяців тому +1

    In address response we dont have employee id and also in the repository query. When I use the same process, I am getting error like column for employee id not found. Unless I add the employee id in the native query and response class, the issue doesn't resolve. How to handle this ?

  • @arnabchatterjee5121
    @arnabchatterjee5121 Рік тому +1

    Really good content sir.Is there any paid course available for this!! I want to explore more on this.

  • @YugNirman15
    @YugNirman15 Рік тому +4

    Please start series of real time project with microservices.

    • @SeleniumExpress
      @SeleniumExpress  Рік тому

      Hi Pradeep, you can follow the current series. This will serve the needs

    • @YugNirman15
      @YugNirman15 Рік тому +1

      @@SeleniumExpress Thank you abhilash. I have followed all Spring, Spring MVC series and share it too with frnds. It was great learning experience.

  • @ashimroy3891
    @ashimroy3891 Рік тому +1

    Sir kindly explain, why are we manually creating database and table ? Is the objective of jpa repository to create the database and table automatically ?

  • @kentfang
    @kentfang Рік тому +1

    how do you deploy both microservices at the same time?

  • @fazalharoon9354
    @fazalharoon9354 Рік тому

    great

  • @user-ef8th4kk3r
    @user-ef8th4kk3r 11 місяців тому +1

    EmployeesResponse class properties will be change in case how to map both employees entity and response class

  • @anoopm4152
    @anoopm4152 Рік тому +1

    Bro please have a series on React

  • @lovetyagi5266
    @lovetyagi5266 Рік тому +2

    PLEASE MAKE VIDEO ON JAVA CONCURRENCY AND NON BLOCKING IO

  • @santhoshchandran6952
    @santhoshchandran6952 Рік тому

    Thank you

  • @vndprasadgrandhi4344
    @vndprasadgrandhi4344 Рік тому +1

    Hi Bro,It's a wonderful explanation..thank you very much for your support.but I have one doubt on importance of model mapper with and without.. please explain 😊

    • @SeleniumExpress
      @SeleniumExpress  Рік тому

      Hi Prasad, without a mapper it will be difficult to manually copy all your entity properties to dto/model properties, considering a scenario you got 30 properties inside your dto

  • @user-ro3hi5gr2j
    @user-ro3hi5gr2j 11 місяців тому +1

    Hello Sir,
    In service package, I am getting error as non static method findById(ID) cannot be referenced from a static context.
    How to fix it?

  • @vasanthselvam9698
    @vasanthselvam9698 Рік тому +1

    Post video for spring boot with multiple data source using spring data JpaRepository

  • @ajithkrkd2562
    @ajithkrkd2562 Рік тому

    your intro song BGM is very motivational

  • @sivaReddy-zn6gp
    @sivaReddy-zn6gp Рік тому +2

    could have added spring data jpa, instead of manually working on databases and tables.

  • @dikshijain9473
    @dikshijain9473 Рік тому +1

    Could you please include authentication and authorisation as well

    • @SeleniumExpress
      @SeleniumExpress  Рік тому

      Hi Dikshi.
      Sure, It's on the way ! Alternatively you can refer my spring security sessions

  • @linhphanthiquynh1573
    @linhphanthiquynh1573 Рік тому +1

    Thank you for your greate lessons. Are there any your paid courses on Udemy? Might I have the links? Thank you very much

  • @collinsboniface2073
    @collinsboniface2073 Рік тому

    Finally

  • @AlokKumar-ot9sx
    @AlokKumar-ot9sx Рік тому +1

    Hello Sir I just came across your channel. May I know if you are teaching Development. Sorry I am just confused by the channel name

  • @bharathalluri9118
    @bharathalluri9118 Рік тому +1

    What if variables name in target class doesn’t match with request object?

    • @SeleniumExpress
      @SeleniumExpress  Рік тому

      Hi Bharath, then we got to manually map using another overloaded map method.
      There are different patterns matches that model mapper provides us. Please refer the model mapper doc.
      I will be creating few contents on model mapper and different mapping api in coming days.

  • @rishiraj2548
    @rishiraj2548 Рік тому

    👍

  • @ajaydhiman2368
    @ajaydhiman2368 Рік тому +1

    Why you didn't use @Repository annotation in Repository class or its optional to use ?

  • @PradeepKumar-sx6ms
    @PradeepKumar-sx6ms Рік тому

    I think you can use IntelliJ and please white background with big font

    • @SeleniumExpress
      @SeleniumExpress  Рік тому +1

      Hi Pradeep, this series is already recorded. I will keep your suggestion in mind during my upcoming recordings.

    • @PradeepKumar-sx6ms
      @PradeepKumar-sx6ms Рік тому

      @@SeleniumExpress are you building full-fledged microservices on youtube if yes, please include kafka

  • @nullpointer500
    @nullpointer500 Рік тому +1

    Hi Abhilash I asked one query in the last video plz reply is this series free to access or it's paid???

    • @SeleniumExpress
      @SeleniumExpress  Рік тому +1

      Hi Rahul, The spring cloud foundation will be free. However this video's are from my paid series which has 200+ hours of contents.

  • @atulsingh9266
    @atulsingh9266 Рік тому +1

    can u gives the source code of this lecture

  • @surajkumardas6206
    @surajkumardas6206 Місяць тому

    Why I am getting column id not found after removing ea.id

  • @archanasingh9379
    @archanasingh9379 Рік тому

    Hello , just need to know it's fir tester or can be fir Java developer

  • @good114
    @good114 Рік тому

    💕❤️

  • @lakhankale9692
    @lakhankale9692 Рік тому +1

    Hi Abhilash when will we expect Next video for this series

  • @adabalasaibharath9018
    @adabalasaibharath9018 Рік тому

    Why do we use response classes?

    • @ainigma100
      @ainigma100 Рік тому

      It is not a good practice to return the actual entity to the user. This is why we use another class as a return type.
      For instance, assume we have an entity with 30 properties and we want to return to the user only some of them. We will have to create another class, in which we will map the values (only the properties we want to return to the user) from the entity to the response class and return the response class back to the user.

  • @sakshisrivastava5986
    @sakshisrivastava5986 4 місяці тому

    any github link for the code?

  • @malyadrichennupati7389
    @malyadrichennupati7389 Рік тому

    feign client sir

  • @pradeepravi9608
    @pradeepravi9608 Рік тому

    When will get next video sir

  • @karan12171
    @karan12171 5 місяців тому

    Why video quality is unavailable for this video😢

  • @user-yl3ml7sr2m
    @user-yl3ml7sr2m 2 місяці тому

    you forgot to map employee id and address id by code in entity class

  • @MainakMondal-np1rd
    @MainakMondal-np1rd 20 днів тому

    Can you give your github profile??

  • @NagaramAshwini
    @NagaramAshwini Рік тому

    when iam going to practice same things in my sts, i am getting hibernate package as jarkata.persistence but for you javax.persistence, how you are getting that? can you please respond?

    • @krishnadaram3179
      @krishnadaram3179 Рік тому

      For spring boot 2.7 version it would be javax above 2.7 it's will be jarkata