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

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 86

  • @ramkumarreddy4295
    @ramkumarreddy4295 2 года назад +19

    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  2 года назад +9

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

    • @techgyan6233
      @techgyan6233 2 месяца назад

      @@SeleniumExpress Using Constructor Mapping
      You can define a constructor in the DTO that takes an entity object as a parameter. This reduces the amount of boilerplate code.
      Example:
      ResponseDTO with Constructor:
      java
      Copy code
      public class EmployeeResponseDTO {
      private Long id;
      private String name;
      public EmployeeResponseDTO(Employee employee) {
      this.id = employee.getId();
      this.name = employee.getName();
      }
      // Getters
      }
      Usage:
      Employee employee = employeeRepository.findById(1L).orElseThrow();
      EmployeeResponseDTO dto = new EmployeeResponseDTO(employee);

  • @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 Год назад +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.

  • @gundrachandrasekharreddy8011
    @gundrachandrasekharreddy8011 2 года назад +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.

  • @ebin44
    @ebin44 Год назад +1

    Marvelous way of teaching 👍

  • @krishnakittu3266
    @krishnakittu3266 2 года назад +8

    Please start series of solving hackers ranking questions :)

  • @mohammedmoosamr4052
    @mohammedmoosamr4052 2 года назад +2

    Eagerly waiting for micro services series thanks 🙏 bro. This complete series is on RUclips

  • @aw703
    @aw703 2 года назад +3

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

  • @harshhwardhanrai3716
    @harshhwardhanrai3716 Год назад +1

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

  • @eswarsai9333
    @eswarsai9333 11 месяцев назад +1

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

  • @vakkalahari5449
    @vakkalahari5449 Год назад +1

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

  • @KarthiKeyan-re1uh
    @KarthiKeyan-re1uh 2 года назад +2

    Most waiting video 😍😍

  • @tasteanotherbite1265
    @tasteanotherbite1265 Год назад +1

    A great explanation. Really helpful.

  • @manamohansamal1040
    @manamohansamal1040 2 года назад +1

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

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

  • @maniteja5215
    @maniteja5215 2 года назад +5

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

    • @SeleniumExpress
      @SeleniumExpress  2 года назад +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.

  • @manish_55
    @manish_55 6 месяцев назад

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

  • @weilichen2961
    @weilichen2961 Год назад +1

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

  • @MohammadShoaibgamerzone
    @MohammadShoaibgamerzone Год назад +2

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

  • @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) .

  • @pallavajhulayaswanthmanika7319
    @pallavajhulayaswanthmanika7319 10 месяцев назад +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 ?

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

  • @mansinghyadav548
    @mansinghyadav548 2 года назад +1

    Thank you soo much sir. We love you sir

  • @aibardulatov
    @aibardulatov 9 месяцев назад

    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?

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

  • @AashishRanjan-z4c
    @AashishRanjan-z4c Год назад +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?

  • @NGUYỄNQUÝTHẮNG-g7u
    @NGUYỄNQUÝTHẮNG-g7u День назад

    I dont know u created foreignkey employee_id to address table, when I linked that my application error.

  • @NiteshShaw-h2p
    @NiteshShaw-h2p 9 дней назад

    java.sql.SQLException: Column 'employee_id' not found.
    How to resolve this issue

  • @YugNirman15
    @YugNirman15 2 года назад +4

    Please start series of real time project with microservices.

    • @SeleniumExpress
      @SeleniumExpress  2 года назад

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

    • @YugNirman15
      @YugNirman15 2 года назад +1

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

  • @ainigma100
    @ainigma100 2 года назад +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!

  • @vndprasadgrandhi4344
    @vndprasadgrandhi4344 2 года назад +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  2 года назад

      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

  • @varatharajvenkat4817
    @varatharajvenkat4817 Год назад +1

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

  • @arnabchatterjee5121
    @arnabchatterjee5121 2 года назад +1

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

  • @kentfang
    @kentfang Год назад +1

    how do you deploy both microservices at the same time?

  • @ajithkrkd2562
    @ajithkrkd2562 Год назад

    your intro song BGM is very motivational

  • @AlokKumar-ot9sx
    @AlokKumar-ot9sx 2 года назад +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

  • @sivaReddy-zn6gp
    @sivaReddy-zn6gp Год назад +2

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

  • @vasanthselvam9698
    @vasanthselvam9698 Год назад +1

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

  • @ajaydhiman2368
    @ajaydhiman2368 2 года назад +1

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

  • @linhphanthiquynh1573
    @linhphanthiquynh1573 2 года назад +1

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

  • @MuralikrishnaPennam
    @MuralikrishnaPennam Год назад +1

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

  • @dikshijain9473
    @dikshijain9473 2 года назад +1

    Could you please include authentication and authorisation as well

    • @SeleniumExpress
      @SeleniumExpress  2 года назад

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

  • @surajkumardas6206
    @surajkumardas6206 5 месяцев назад

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

  • @anoopm4152
    @anoopm4152 2 года назад +1

    Bro please have a series on React

  • @nullpointer500
    @nullpointer500 2 года назад +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  2 года назад +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.

  • @lovetyagi5266
    @lovetyagi5266 2 года назад +2

    PLEASE MAKE VIDEO ON JAVA CONCURRENCY AND NON BLOCKING IO

  • @bharathalluri9118
    @bharathalluri9118 2 года назад +1

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

    • @SeleniumExpress
      @SeleniumExpress  2 года назад

      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.

  • @lakhankale9692
    @lakhankale9692 2 года назад +1

    Hi Abhilash when will we expect Next video for this series

  • @karan12171
    @karan12171 9 месяцев назад

    Why video quality is unavailable for this video😢

  • @PradeepKumar-sx6ms
    @PradeepKumar-sx6ms 2 года назад

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

    • @SeleniumExpress
      @SeleniumExpress  2 года назад +1

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

    • @PradeepKumar-sx6ms
      @PradeepKumar-sx6ms 2 года назад

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

  • @atulsingh9266
    @atulsingh9266 Год назад +1

    can u gives the source code of this lecture

  • @adabalasaibharath9018
    @adabalasaibharath9018 2 года назад

    Why do we use response classes?

    • @ainigma100
      @ainigma100 2 года назад

      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.

  • @fazalharoon9354
    @fazalharoon9354 Год назад

    great

  • @archanasingh9379
    @archanasingh9379 2 года назад

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

  • @sakshisrivastava5986
    @sakshisrivastava5986 8 месяцев назад

    any github link for the code?

  • @pradeepravi9608
    @pradeepravi9608 2 года назад

    When will get next video sir

  • @start1learn-n171
    @start1learn-n171 2 года назад

    Tq

  • @MainakMondal-np1rd
    @MainakMondal-np1rd 4 месяца назад

    Can you give your github profile??

  • @collinsboniface2073
    @collinsboniface2073 2 года назад

    Finally

  • @malyadrichennupati7389
    @malyadrichennupati7389 2 года назад

    feign client sir

  • @rishiraj2548
    @rishiraj2548 2 года назад

    👍

  • @good114
    @good114 Год назад

    💕❤️

  • @santhoshchandran6952
    @santhoshchandran6952 2 года назад

    Thank you

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