Spring ServiceLocatorFactoryBean Example | Java Techie

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 36

  • @morningmotivation4745
    @morningmotivation4745 5 місяців тому +1

    Thank you very much for the great explanation ❤

  • @abhijitprusty
    @abhijitprusty 2 роки тому +1

    @Basant your videos extremely informative...it has always helped me a lot. Keep learning and keep posting ...

  • @ZohKrahM
    @ZohKrahM 2 роки тому

    Excellent video, I loved you showed the problems with if statements first and how we can solve it in a nicely way with Service Locator.

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

    Excellent explanation !!

  • @ankitgupta5649
    @ankitgupta5649 5 років тому +3

    Thanks Basant ! please make more videos on this type patterns which we should use in our projects

  • @siyedyoussef3202
    @siyedyoussef3202 5 років тому +1

    Keep up the great work Sir 👍👍

  • @ganeshparida3794
    @ganeshparida3794 5 років тому +1

    Thanks bro..it is very useful for project .

  • @AmandeepSingh-sx9ke
    @AmandeepSingh-sx9ke 5 років тому +1

    Nice video sir . Good job

  • @GK_Entertainment_
    @GK_Entertainment_ 5 років тому +1

    Great video..

  • @sujithg5873
    @sujithg5873 5 років тому +1

    Thanks good video ☺️☺️☺️

  • @mubaraktube1
    @mubaraktube1 5 років тому +2

    Great video, thanks for the efforts. Please upload more videos related to design patterns.

    • @Javatechie
      @Javatechie  5 років тому +2

      After few more means 2 3 concept we will start microservice series with cloud deployment .

  • @abhimanyue102
    @abhimanyue102 4 роки тому +1

    if any exception occurred in SLConfig for example requested payment bean is not available .. how it will be handled ?

  • @sureshsadanala3605
    @sureshsadanala3605 5 років тому +1

    gud one Bro 😊

  • @vysaivicky4724
    @vysaivicky4724 3 місяці тому

    Can you please make the flow diagram at the end how the flow works it will be useful for beginners to grab the content easily

  • @sasi2182
    @sasi2182 5 років тому +1

    Thanks Basant

  • @ashishchoksi8501
    @ashishchoksi8501 2 роки тому +1

    Can we have multiple service locator resolving different type of services in same spring boot app?

  • @bashful88
    @bashful88 4 роки тому +1

    Thank you Friend :)

  • @pragmaticcoder6910
    @pragmaticcoder6910 2 роки тому

    Hi Basant, let’s say if my request body does not have any decision making property in this case payment type, how can I decide which service bean to invoke? E.g my request body looks like { itemUpc: “123”} and I need to invoke service bean related to item service. How can I do that?

  • @personelpurpose1531
    @personelpurpose1531 2 роки тому +1

    hi sir ,do you know about spark framework used in Java could you please do a video on same

  • @rameshchowdarykonka5551
    @rameshchowdarykonka5551 5 років тому +1

    Tq... Please do some videos on sql interview questions for experienced...

  • @yravi37
    @yravi37 3 роки тому +1

    We should pass the service name in Postman or as parameter? How to pass service param in application?

    • @Javatechie
      @Javatechie  3 роки тому

      YRK I passed as a parameter only @PathVariable annotation used to pass input as part of request URL

  • @furkantanrverdi1574
    @furkantanrverdi1574 3 роки тому

    I am getting the following error -> Consider defining a bean of type 'com.xx.XXRegistry' in your configuration.

  • @satishpatro
    @satishpatro 4 роки тому

    Nice one. But, plz jnstall sonar lint.

  • @rohith9s
    @rohith9s 5 років тому +1

    Description:
    Field serviceRegistry in com.orgName.test.handlers.impl.StrategyHandler required a single bean, but 3 were found:
    - initBaseProcessStrategyBean: defined by method 'initBaseProcessStrategyBean' in class path resource [com/orgName/test/config/serviceLocators/BaseProcessStrategySLConfig.class]
    - initBaseFileHandlerBean: defined by method 'File1HandlerBean' in class path resource [com/orgName/test/config/serviceLocators/File2HandlerSLConfig.class]
    - initEcommerceServiceBean: defined by method 'initEcommerceServiceBean' in class path resource [com/orgName/test/config/serviceLocators/File3HandlerSLConfig.class]
    Action:
    Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
    For each service i should write two files one is File1HandlerServiceRegistry(Interface) and the other File1HandlerSLConfig.java(which is class) cant we do in same files respectively

    • @Javatechie
      @Javatechie  5 років тому

      Please follow my steps thoroughly , check whether you add sterio type annotations in all your implementation or not and also make sure you provided name for it

    • @rohith9s
      @rohith9s 5 років тому +1

      @@Javatechie when we have multiple service locator interfaces, we should add @Primary to one of the interface. which has solved my problem.

  • @oneoutof360
    @oneoutof360 3 роки тому

    how this is different from stretagy design pattern

  • @universal4334
    @universal4334 3 місяці тому

    Should've explained it more like why we need payment registry and how locator is providing bean to registry etc.. may be im a noob
    Or may be should've been straight forward like directly getting from applicationcontext.getbean(name,service.class) which directly gives bean

  • @prakashr3755
    @prakashr3755 2 роки тому +1

    Hi Basanth, how about autowired map servicesMap;
    And in method, just call servicesMap.get("amazonPay").pay(request)

    • @Javatechie
      @Javatechie  2 роки тому

      This is what you are doing similar to the factory right