Designing Microservices using Spring Boot, Spring Cloud, Eureka and Zuul | # 1 | Tech Primers

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ • 363

  • @TechPrimers
    @TechPrimers  4 роки тому +2

    ⏱ Chapter Timestamps
    ====================
    0:00 - Intro
    0:46 - Architecture
    8:36 - Creation of db-service
    25:29 - Testing db-service
    27:47 - Deletion feature in db-service
    30:50 - Creation of stock-service
    47:39 - Testing stock-service
    52:15 - Creation of eureka-service
    56:39 - Eureka Dashboard
    57:34 - Enable Eureka in stock-service
    59:31 - Enable Eureka in db-service

  • @shuklabhanuprakash
    @shuklabhanuprakash 6 років тому +5

    The best thing about the tutorial we can see what errors might come during setup, thank you techprimer to make such videos not readymade things.

  • @abvijaykumar
    @abvijaykumar 5 років тому +31

    great tutorial - wish there was no music..it is very distracting..Keep posting more

  • @jsever5517
    @jsever5517 6 років тому +1

    You seriously deserve an like and subscribe. You teach the way it actually help to learn than just showing how one do it its more like how its must be done. Thanks for the great tutorial :)

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

    Thanks for the presentation. Its nice & to the point for someone who wants to quick start on Micro Services using Spring Boot.

  • @abhishekmishra-ik7ve
    @abhishekmishra-ik7ve 4 роки тому +1

    I would say it's the best video with eureka and zuul implementation. Thanks :)

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

    Wow. Excellent session which covers clearly what it is intended to. Kudos to tutor.

  • @rahulsantharaam
    @rahulsantharaam 6 років тому +3

    THANK YOU SO MUCH.
    Pros:
    - Great hands on explanation
    - No fluff, just stuff
    Cons:
    - BG music
    - Sometimes the scrolling between IDEs is too fast (so unable to see which layer has what port number) - but managed to pause the find the info.
    Overall I enjoyed watching the full video. Better than some videos I have seen on pluralsight.com
    Keep up the good work buddy!!

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

    Excellent !!!
    In fact resolving the errors (while running the server) due to incorrect port number, made the video revisit the configuration, which could have been missed out while watching :-).
    Excellent again !!!

  • @knockjkeee
    @knockjkeee 5 років тому +4

    Thank! This is the best in the open spaces of the site, the explanation is simple and clear Thank you!

  • @AndhraKitchenFoods
    @AndhraKitchenFoods 3 роки тому +2

    This is a wonderful technology channel.

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

    Hi, great job, thanks!
    Some people talk about noisy music at background, but I personally think, it was calming and fitted well, so please, don't remove it)

  • @San13692
    @San13692 7 років тому +1

    Amazing video ..simply followed the steps and application worked perfectly . Also got the understanding of Netflix Eureka. Great tutorial!!

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

    Neat and clean explanation. Thanks for the video.

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

    superb tutorial .. n grt background music .. very helpful

  • @jayakumarj85
    @jayakumarj85 6 років тому +1

    Nice tutorial. If you can give the links for your other tutorials in the description, it would be easy to refer. I could not find a separate video from you on zuul proxy as you have mentioned in this tutorial.

  • @DeepakPandey-ij3bz
    @DeepakPandey-ij3bz 3 роки тому +1

    Thanks for the tutorial. Is there any tutorial shared by you to show the communication between microservices using eureka on kubernetes (any cloud). If yes please share the link.

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

      Does this video suffice Deepak? - ua-cam.com/video/icyHIjfgYRY/v-deo.html

    • @DeepakPandey-ij3bz
      @DeepakPandey-ij3bz 3 роки тому

      @@TechPrimers Thanks for the reply. This tutorial is not including eureka server but the it is helpful in understanding the communication between microservices. I have seen a lot of examples where eureka is used and in eureka server we have to provide a url of eureka server in properties. I am trying to understand how that url part will be handled in kubernetes (cloud) because in local machine it is localhost but in kubernetes it should be pod url. Please share your thoughts. Thanks

  • @nabinkhatiwada4597
    @nabinkhatiwada4597 6 років тому +1

    NO issue.1st part Worked perfectly as shown. Currently running Spring Boot 2.0

  • @RGWorld148
    @RGWorld148 6 років тому +46

    Good tutorial but background is disturbing.

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

      Background music u mean?? Cos I personally liked this dark background (developers obsession) ;-)

    • @VinayKumar-ru1rg
      @VinayKumar-ru1rg 4 роки тому

      Infact the background music help reduce the monotonous work. i liked it.

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

      Please repost but no background music. ? Thanks

  • @artemaz
    @artemaz 7 років тому

    When you want to open a Maven project in IntelliJ, select the 'pom.xml' file and open it as a project. IntelliJ will automatically pickup that it's a Maven project. If you select just the folder, generally it won't recognise that it's a Maven project at first.

  • @rageshsharma4368
    @rageshsharma4368 7 років тому +1

    Very nice tutorial.. Thanks... waiting for upcoming videos..

  • @jannu234
    @jannu234 6 років тому +2

    Very nicely explained.......Awesome :)
    Thanks a lot

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

    You are awesome buddy. I really love the way you code. Especially Java8.
    #MicroServices #Spring-Boot #Spring-Cloud #Java8

  • @kurupudiveeradurga4970
    @kurupudiveeradurga4970 6 років тому +1

    Nice video ... Ajay..learnt lot of things in very less time.

  • @kevguev1
    @kevguev1 6 років тому

    At 29:28, how are you not getting a compilation time error for delete if delete() should only accept 1 Quote?

    • @sanjaymodha3751
      @sanjaymodha3751 6 років тому

      I solved the compilation error by writing the below code. quotes.stream()
      .forEach(quote -> quotesRepository.delete(quote));

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

    GREAT tutorial!!! Very clear & well explained.
    (Like others said, background sound was a bit loud but I'm sure that can be fixed next time. One way to control that sound is to record the video without background, then add background sound during the video mixing so you can keep it on a separate audio channel & control its volume when needed)

  • @neerajchand6436
    @neerajchand6436 6 років тому +1

    Good Job...Please add some advanced level videos on microservices covering Zipkin & hystrix.

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

    Awesome tutorial. Many thanks. Kindly keep the background music low when uploading more tutorials.

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

    if you're getting a timezone error for mysql, try this line in your application.properties file :
    spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=EST5EDT

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

    Hello Ajay, Thank you for wonderful tutorials. Explanation was very good with easy examples. At 4:16, you mentioned that you have prepared videos of what is Eureka and What is Zuul. I tried to find those videos, but didn't catch them. Can you please share link of those videos.

  • @peterchen6462
    @peterchen6462 6 років тому +1

    Best demo I have ever seen

  • @markgargan5793
    @markgargan5793 6 років тому +1

    This is an excellent resource Ajay. It's true the background music is a little disconcerting but if you just lower it without muting it I think it does help to concentrate the mind. It's a real find of a video. Inclusive of the resources you mention in the title, you cover start.spring.io, Java 8 streams and display a excellent working knowledge of Intellij. Thanks and well done.

    • @TechPrimers
      @TechPrimers  6 років тому +1

      Thanks mark. Yeah. all new videos don't have the music.

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

    Excellent explanation. I am trying to setup project based on above explanation. I get following error after setting up Hiberante
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_241]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_241]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_241]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_241]

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

    Hi @techprimers_admin, nice explanation,
    And also I was wondering what’s the software you use for your presentations where the images/text
    will get step by step instead of all at a time in ppt. One you used above during 1:58 where the boxes (components) are coming just like magical that too in single page.. thank you.

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

      I use Google Slides kishore. Yes its a mixture of component animations and slide transitions

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

    Hi,
    Could you explain the reason for embedding zuul proxy in eureka server ? What is the strategy of running these two process in same service/instance ? Can i use this same strategy in production environment ? What type of discovery is this pattern ? Your architecture diagram look likes Server - Side Discovery but implementation looks like Client-Side discovery. Thanks in advance.

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

    Such a nice tutorial. Thanks man

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

    Hi, I am getting Caused by: java.sql.SQLException: Unknown system variable 'tx_isolation' exception and not able to resolve. Need some help please.
    Thanks
    Jayasree

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

    Can you do one video on sagas design pattern with Spring boot based code example? Thank you and much appreciated.

  • @niftymiller6057
    @niftymiller6057 6 років тому +1

    Awesome ! So simple and fast :) keep rocking

  • @tapanupadhyay
    @tapanupadhyay 6 років тому

    Really very nice Tutorial. well explained, Thanks mate. For Eureka server, your 8080 port was in used not 8761. You don't need to change your port cause your 8080 was already in use taken by tomcat server by default, therefore, it was showing an error. Running Eureka server at 8761 will not work. it's tomcat which brings this server up. When you change the Tomcat server port it started running fine.

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

    1. Can hosting a seperate DB service be optimised further ? I mean can we not create a jar of this service and ask the consuming services like quote mgmt service to use it as a maven dependency , we can save the network calls then . What do u think ?

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

      Yes Nishanth, that's possible however the only downside to that is, if the database changes, then every consuming client app needs to upgrade the jar to latest version. It will work for small teams, May not work for bigger organizations since each team will have their own roadmap and priorities. Getting all of them insync will be challenging

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

      @@TechPrimers ohh I see , then for bigger teams , your approach yes does outweigh the Maven approach . But this comes with a network overhead . Do we then employ here the following strategies to keep NFRs intact :
      1. Scalability : service containerisation would do
      2. Since db service will be called by the service for most of the operations for which user has to wait on the screen , we can use rsocket to keep a connection pooling for better response times ? I may be wrong in this point .
      3. When deploying db-service , we deploy a new service instance and then de comission the old one ?
      Sorry if the queries are large . I am working in a small team hence not able to envision the requirements of a larger team .

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

    hello...
    I have implemented zuul gateway which helps to call microservices .but the doubt is I want to apply like,
    I have authenticated service which implements JWT, and some other micro services. now I want to check before every request from zuul - URL is the user already logged in or not if the user already logged in then able call other microservices or APIs else return login UI.
    please give me some reference or hit to do this.thank you in advance,

  • @RohitKumar-ke3od
    @RohitKumar-ke3od 5 років тому

    Hi
    I am using AWS ecs to deploy springboot microservice application and I am able to do.
    But how to deploy using eureka server and client.
    I search in google but didn't get any proper blog to deploy eureka in aws.
    Please someone help me what are the changes needed to deploy eureka in AWS.

  • @vpezzano
    @vpezzano 6 років тому

    Hi Ajay, it appears a bit fuzzy to me the difference between SOA and microservices. But, as I understand, the main differences are that microservices are more fine-grained than SOA, and each microservice has an indipendent database layer. In this example, we have 2 microservices that are using the same database layer. So, isn't this going more towards SOA than real microservices, and what is the best approach? Thanks a lot for your great videos. Valentino

  • @manikmaurya791
    @manikmaurya791 6 років тому +1

    Excellent tutorial.
    Easy to understand, you really deserve lot
    Thanks

  • @nitingupta1886
    @nitingupta1886 6 років тому

    I am getting the below error in db-service., could you please help
    2018-05-22 21:43:34.706 ERROR 9445 --- [ main] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
    java.sql.SQLException: Unknown system variable 'tx_isolation'

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

    Excellent tutorial

  • @photo_lab4095
    @photo_lab4095 7 років тому

    superb Tech Primers It's a very helpful video session thanks a lot to share this type of knowledge thanks again

  • @urbannerdz
    @urbannerdz 6 років тому +1

    Awesome video!! Once the microservice architecture is created, how would I implement Swagger for documenting the API endpoints?

    • @TechPrimers
      @TechPrimers  6 років тому

      you can check my video on swagger with spring boot and use it in this

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

    Can you provide the link to learn about zuul? I tried searching it , but not able to find it…

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

    Hi , when I am converting DB service application as eureka client , every times it fails causing java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'. , hibernate session factory and related exception , whereas when i comment out the @Enable eureka client it starts working fine,
    I added the dependencies as mentioned and also tried changing the version of the spring-boot dependency

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

    I have followed your lecture carefully but not able to start the server and application. getting error
    1.
    Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource:
    reason : Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
    2. Failed to load ApplicationContext
    3.Application run failed

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

    Eu tenho 1 problema ao tentar logar mandar uma requisicao pro curso.
    Eu ainda tomo erro 401 e debugando eu identifiquei que no setSecurityContext da class SecurityContextUtil.java, eu nao tenho JWTClaimsSet.
    Nao sei onde pode ser o problema.

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

      Na verdade eu tenho a ClaimSet, mas ela nao tem username. Eu so tenho iss, exp, userId, iat e authorities.

  • @sumanchandrasaw7637
    @sumanchandrasaw7637 6 років тому

    How in microservice architecture two services communicate each other ? and if any exception through one service which is dependent on other service how we will handle the exception ??

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

    Hi Tech Primers, which component does the load balancing ? Service Registry or API Gateway ? thanks

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

      It depends. Usually API Gateway does it in our case

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

    In the delete endpoint, quotesRepository.delete(quotes) does not work for me but quotesRepository.deleteInBatch(quotes) worked

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

    Hi Tech Primers,
    How would you secure your services ? Could you help me in understanding, what could be the good architecture to implement authentication and authorization in micro services, assuming application is both B2B and C2B.

  • @JKCHAKRI1
    @JKCHAKRI1 7 років тому

    Hi Ajay,
    when I start the stock-service I get the following message and the application fails to start
    Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
    For stock service we dont need to configure the database right? Request you to help me out here

  • @vijay517501
    @vijay517501 6 років тому +3

    your explanation and presentation are awesome.

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

    YOu mentioned about the video on Eureka and Zuul. Kindly, provide the link. WIth google getting many other

  • @channuk1
    @channuk1 7 років тому +1

    Superb tutorial and presentation!

    • @TechPrimers
      @TechPrimers  7 років тому

      Thanks Channu. Glad that was useful

  • @naveensharma9834
    @naveensharma9834 6 років тому

    Getting exception on following line in delete method
    @PostMapping("/delete/{username}")
    public List delete(@PathVariable("username") final String userName){
    List quotes = quoteRepository.findByUserName(userName);
    quoteRepository.delete(quotes); // in CurdRepository cannot be applied.
    return getQuotesByUserName(userName);
    }
    Let me know if i'm missing something
    And I've not seen any delete(List obj) method in CurdRepository.

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

    while making a video for developer main challenge is to solving exception, you should explain how to resolve those exception as well, in delete method how can we pass a list type object reference in List quotes = quotesRepository.findByUserName(username);
    // quotesRepository.delete(quotes); this line I am getting error stating that this quotes should be Quotes type rather a list type, and I was commenting that piece of code and I am getting error while hit the url in postman getting this error, {
    "timestamp": "2019-04-18T15:18:32.024+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "No message available",
    "path": "/rest/db/add"
    } Please help to resolve this

  • @VishuCartoons
    @VishuCartoons 6 років тому

    Let assume we have 30 microservices, so one instance of eureka server can not handle the all request. so we have to go for multiple instance of eureka server. my question is how to configure multiple instance of eureka server and how to register microservices with them?

  • @AmitSingh-vb6oj
    @AmitSingh-vb6oj 6 років тому +1

    Very nice and informative video. Keep it up

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

    I think that application.yml is not working on this dependency.
    I am expecting help. Thank you.

    org.springframework.cloud
    spring-cloud-starter-netflix-eureka-client

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

    Hello my friend, i have a error in de DbServiceResource, line "quotesRepository.delete(quotes)", the sistem told me
    "The method delete(Quote) in the type CrudRepository is not applicable for the arguments (List)"
    What can be wrong with my code?

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

      I fixed using "quotesRepository.deleteAll(quotes)", what can be he reason that the original code doesnt work for me

  • @madhavkotha
    @madhavkotha 7 років тому

    Hi this is very good video on Microservices can you please demo how we can deploy same project on container platforms like docker and kubernetes

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

    Its returning 401 - unauthorised now with 3.13.0 and 3.12.3. Is there a way to fix this?

  • @tariqahsan
    @tariqahsan 7 років тому +5

    Hi Ajay
    Great tutorial! Specifically learned about the usage of Zuul - Netflix's JVM based router and server side load balancer. Also learned about client-side service discovery using Spring Cloud Netflix Eureka. By the way, the music you play in the background is pretty cool. Sets the mood to write code :) Can you share the name of the music? ;) Thanks!

    • @TechPrimers
      @TechPrimers  7 років тому

      Thank you Tariq. Glad to hear that. :)
      In this video the music is here: brokeforfree.bandcamp.com/track/day-bird
      Most of videos are from Joakim Karud (you can search in soundcloud.com for his tracks)

  • @sachinshukla6047
    @sachinshukla6047 6 років тому +1

    Really nice video. I watched both of them and liked them as well. good information is filled in less time along with Architecture diagram. One of the best videos to learn Spring boot concepts.
    -$

    • @TechPrimers
      @TechPrimers  6 років тому

      thanks sachin. Glad that was useful

  • @SanjeevKulkarniWorld
    @SanjeevKulkarniWorld 6 років тому +1

    Nice explanations, refreshed the concepts..

  • @ankurshah8341
    @ankurshah8341 6 років тому

    Hi,
    Thanks for the hands on tutorial. Just one doubt. Don’t you think the database should associate with each micro services instead one common dB services for two micro services?

    • @TechPrimers
      @TechPrimers  6 років тому

      That's upto us. These are principles and standards. It makes sense when each microservices are managed by a different team.

    • @ankurshah8341
      @ankurshah8341 6 років тому

      If so then how will it be different then the monolithic architecture where all the services is referring single database. If we follow the one you are saying, it will be monolithic service sooner than later. Isn't it?

  • @yogitashelar8739
    @yogitashelar8739 6 років тому +1

    Hi I am trying to build Eureka service, facing error as "No bean found of type 'com.netflix.appinfo.ApplicationInfoManager' "
    Class in Maven dependency is present.
    Could you please help. Thanks

    • @TechPrimers
      @TechPrimers  6 років тому

      Where are running this program from? looks like the Netflix libraries are not getting downloaded to your system

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

      @@TechPrimers facing error as "No bean found of type 'com.netflix.appinfo.ApplicationInfoManager' " . Netflix libraries are getting downloaded.

  • @latin_prologue
    @latin_prologue 7 років тому

    Hi, thanks for the video. A little help would be appreciated. My db-service works fine. when i run my stock-service, it doesn't startup saying it has some error getting CloudEurekaClient. I was wondering if you took some steps to setup Eureka, I understand that the Eureka server is not yet up and running and the stock-service should startup just fine but somehow my stock-service doesn't startup
    Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is java.lang.NullPointerException
    some useful error messages
    2018-01-19 18:54:00.414 INFO 682 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=21ae6e73,type=ConfigurationPropertiesRebinder]
    2018-01-19 18:54:00.439 INFO 682 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
    2018-01-19 18:54:00.449 INFO 682 --- [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING
    2018-01-19 18:54:00.508 INFO 682 --- [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1
    2018-01-19 18:54:00.536 ERROR 682 --- [ main] o.s.c.n.e.s.EurekaRegistration : error getting CloudEurekaClient
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.eurekaClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.discovery.EurekaClient]: Factory method 'eurekaClient' threw exception; nested exception is java.lang.RuntimeException: Failed to initialize DiscoveryClient!

    • @TechPrimers
      @TechPrimers  7 років тому

      HI Kaus, No additional setup is required for Eureka to be UP. just check if your ports are not blocked by other processes?

  • @kennyadetiloye204
    @kennyadetiloye204 6 років тому +1

    Can you explain how to secure microservices with jwt and/or oauth2?

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

    hello thanks for tutorial. If we put eureka and zuul in the same microservices, how to prevent client access to localhost:8003/eureka dashboard. because we need to open this api to world wide web. now everyone can see our service registiry right?

  • @GautamKumar0412
    @GautamKumar0412 6 років тому

    Hi, please give the link to the video you mentioned "What is zuul" and "What is Eureka"

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

    Please add 3rd episode of microservices video with hystrix and logging that will very helpful Mr. Champion behind tech primer

  • @christiankocevar6791
    @christiankocevar6791 6 років тому +1

    Very interesting video as it shows consequently how the practive works very good. Is the source code for download somewhere?

    • @TechPrimers
      @TechPrimers  6 років тому

      Yes it's in the GitHub link in the description

  • @Simplify-Tech
    @Simplify-Tech 6 років тому

    Nice video tutorial but want to know how to implement spring security in microservice architecture? Can you please make video tutorial for that?

  • @amitpatel2758
    @amitpatel2758 6 років тому

    Hi, I am facing below error, while bringing up stock-service, please help
    org.springframework.context.ApplicationContextException: Failed to start bean 'eurekaAutoServiceRegistration'; nested exception is java.lang.NullPointerException

  • @surendirababujanarthanan761
    @surendirababujanarthanan761 7 років тому +1

    why do we need to register db service instance too as a client ? because anwway we are gonna access via stock price service right. Is there any specific purpose behind this registration?

    • @TechPrimers
      @TechPrimers  7 років тому +1

      +surendirababu janarthanan Yes. We don't have to hard code URL of Db service in stock service, hence we register db service to Eureka and access it from there. If DB service is deployed in different port, we don't have to do a code change in stock service. Hence this architecture pattern is followed

  • @akshayask4978
    @akshayask4978 5 років тому +4

    Good tutorial but remove background noise. Thanks a lot , that I understood basics of ms . Please upload next videos

  • @sudiptendupal7254
    @sudiptendupal7254 6 років тому +1

    Hi Tech Primer, let me complement you first by saying "both the videos you posted on Micro services were simply superb". I am an AWS Architect who is learning Spring Boot from your lectures. Can you help me in resolving few questions on a complex AWS architecture diagram? I am looking forward to integrating AWS API-Gateway REST services with Spring Boot.

  • @zhijunhe2332
    @zhijunhe2332 6 років тому +1

    these urls are more restful: get /rest/deb/quotes, post /rest/db/quotes, delete /rest/db/quotes/{id}

  • @samyzemmouri4534
    @samyzemmouri4534 6 років тому

    Whats your opinion on using netflix oss vs istio Envoy when it come to deploy this application on k8s ?

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

    Hi please share URL for zuul and eureka as you mentioned in this video.

  • @61Marsh
    @61Marsh 6 років тому +1

    Hey man, Thanks for the tutorial, very informative!!

  • @plzmerryme
    @plzmerryme 6 років тому

    I am getting this error it is not getting auto wired
    Parameter 0 of constructor in com.learnspring.stock.dbservice.resource.DbServiceResource required a bean of type 'com.learnspring.stock.dbservice.repository.QuoteRepository' that could not be found

    • @TechPrimers
      @TechPrimers  6 років тому

      the repository is not getting scanned by Spring Boot. Check if you have @EnableJpaRepositories annotation

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

    Ajay, too good..Keep posting:)

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

      Thank you Pritam. Glad that was useful!

  • @atv8465
    @atv8465 6 років тому +1

    Hi.. Can u pls add new video for adding throttling in Spring Cloud services solution project.

  • @subaratatubebd
    @subaratatubebd 7 років тому +1

    You setup database connection properties but where is the MySql database? Is it been created automatically. If it is created automatically but I got some errors like:
    Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
    at com.subaratabio.dbservice.DbServiceApplication.main(DbServiceApplication.java:12) [classes/:na]

    • @TechPrimers
      @TechPrimers  7 років тому

      Yes Subrata, the tables are created automatically when you have auto-dll as 'update'. can you provide the code which you are using (you can upload the project to GitHub). Also you check my example from the Github link in the description

    • @subaratatubebd
      @subaratatubebd 7 років тому

      Thanks bro for instant replay, for the sake of better understand, I uploaded my code into Github. Please kindly check it and help me for further process.
      github.com/Subarata-Talukder/Spring-Microservice

    • @TechPrimers
      @TechPrimers  7 років тому

      The issue is due to Autowiring problem in DbServerService.java.
      github.com/Subarata-Talukder/Spring-Microservice/blob/master/db-service/src/main/java/dbresource/DbServerService.java
      Add Constructor Injection or @Autowire for the QuotesRepo variable.

    • @subaratatubebd
      @subaratatubebd 7 років тому

      After applying your suggestion but it is returning errors like. Could you explain it (One thing I forgot to inform you, I am developing this project on Ubuntu Linux based Machine)
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1078) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.4.RELEASE.jar:1.5.4.RELEASE]
      at com.subaratabio.dbservice.DbServiceApplication.main(DbServiceApplication.java:12) [classes/:na]
      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:882) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
      at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:353) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:370) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:359) ~[spring-orm-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.9.RELEASE.jar:4.3.9.RELEASE]
      ... 16 common frames omitted
      Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to open JDBC connection for schema management target
      at org.hibernate.tool.schema.internal.TargetDatabaseImpl.prepare(TargetDatabaseImpl.java:42) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:57) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:472) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
      ... 22 common frames omitted
      Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_144]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_144]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_144]
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_144]
      at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.MysqlIO.(MysqlIO.java:341) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2192) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2225) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2024) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:779) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) ~[mysql-connector-java-5.1.42.jar:5.1.42]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_144]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_144]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_144]
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_144]org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      at org.hibernate.tool.schema.internal.TargetDatabaseImpl.prepare(TargetDatabaseImpl.java:38) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
      ... 28 common frames omitted
      Caused by: java.net.ConnectException: Connection refused (Connection refused)
      at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_144]
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_144]
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~
      ............

    • @TechPrimers
      @TechPrimers  7 років тому

      The @EnableJpaRepositories has incorrect package name. You have to put the package of the QuotesRepo. which is "reporesource". Change that.
      The error says its not able to load the Quote entity into the Repo since its not able to identify it as a jparepository

  • @sumitkhetan1094
    @sumitkhetan1094 6 років тому +3

    background sound is disturbing too much. good tutorial

  • @michaelchung8102
    @michaelchung8102 6 років тому

    I've imported the Maven project and launched the Eureka service then the DB service.
    1. Launching the Eureka service is a success.
    2. Launching the DB service is a success (I've modified the application.properties to connect to my MySQL database).
    However, after I launch the DB service, the Eureka service keeps throwing exception:
    ERROR 3146 --- [et_localhost-17] c.n.e.cluster.ReplicationTaskProcessor : Network level connection to peer localhost; retrying after delay
    com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused
    localhost:8302 gives me:
    Application: DB-SERVICE
    AMIs: n/a (1)
    Available Zones: (1)
    Status: UP (1) - 192.168.1.4:db-service:8300
    EMERGENCY! EUREKA MAY BE INCORRECTLY CLAIMING INSTANCES ARE UP WHEN THEY'RE NOT. RENEWALS ARE LESSER THAN THRESHOLD AND HENCE THE INSTANCES ARE NOT BEING EXPIRED JUST TO BE SAFE.

    • @michaelchung8102
      @michaelchung8102 6 років тому

      Fixed it by changing port of the Eureka service from 8302 to 8761 (default).

  • @thrinathsf1280
    @thrinathsf1280 6 років тому

    What is the advantage of having db-service.? We can create a seperate project for data jpa (entities, repositories) and add dependency in micro services. Right? Please let me know

    • @TechPrimers
      @TechPrimers  6 років тому +1

      that way our DB and its relevant microservice is separate. else, if there is a Table change, you need to update all microservices to use the new dependency verison.

    • @thrinathsf1280
      @thrinathsf1280 6 років тому

      Tech Primers thanks for the clarification

  • @VENKATESHPUPPALApatel
    @VENKATESHPUPPALApatel 6 років тому +1

    Great channel! very use full

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

    Can you please give the next video's link?

  • @gibbs974
    @gibbs974 7 років тому +1

    Thank you very much.Please make a video on Docker.

    • @TechPrimers
      @TechPrimers  7 років тому

      hi Anil, you can check my video on Docker with Spring Boot.

  • @suneesh0388
    @suneesh0388 6 років тому

    Hello ,
    How do I deploy this in External SSL enabled tomcat ?