How to create your own custom Spring Boot Starter

Поделиться
HTML-код
  • Опубликовано: 26 сен 2024
  • In this tutorial you will learn how to create your own custom Spring Boot Starter. Spring Boot has a number of pre built starters that are great for bootstrapping your applications but how can you create your own? We will walk through the process of building a starter from scratch and talk about some of the processes for doing so.
    🔗Resources & Links mentioned in this video:
    GitHub Repo: github.com/dan...
    Starters: docs.spring.io...
    Creating your own starter: docs.spring.io...
    👋🏻Connect with me:
    Website: www.danvega.dev
    Twitter: / therealdanvega
    Github: github.com/dan...
    LinkedIn: / danvega
    Newsletter: www.danvega.de...
    SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️

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

  • @ilkou
    @ilkou 7 месяцев назад +6

    what's better than using spring boot magic --> building spring boot magic 💚

  • @AleksandarT10
    @AleksandarT10 7 месяцев назад +3

    Great example! Would be useful for many people. I would like to mention that same behavior can be achieved without using Spring Boot AutoConfiguration - it can be pretty much made as a third party jar/library

    • @DanVega
      @DanVega  7 месяцев назад +2

      Good point! We went over a very simple example here. When you get into AutoConfiguration you can use special classes to check if a bean or class is there and then back off. This is how the things like DataSource auto-configuration works.

    • @praveens2272
      @praveens2272 7 месяцев назад +4

      ​@@DanVega can you cover conditional things ?

  • @simeonpopov4172
    @simeonpopov4172 3 месяца назад

    Thank you a lot for this video. You saved me a lot of time in debugging. I love your videos and the way that you explain. Keep the good videos going.

  • @d47im5e
    @d47im5e 6 месяцев назад +2

    Very informative, video, i have been meaning to read the docs about this for my company, and have been putting it off, this video made me jump right back into the mix:). Thank you very much. Keep it up 👍

  • @Bubumuk
    @Bubumuk 7 месяцев назад +1

    Thanks, Dan. I've been wanting to explore creating my own starter for some time.

  • @birbir969
    @birbir969 7 месяцев назад +1

    I been waiting for this very long time. Thank you very much.

    • @DanVega
      @DanVega  7 месяцев назад

      Thank you, I hope you enjoy it.

  • @mohammaddarmousa4167
    @mohammaddarmousa4167 7 месяцев назад +2

    Thanks Dan, Waiting for the next one on how to publish to mvn central

    • @DanVega
      @DanVega  7 месяцев назад +2

      I will get to that but it's probably going to be a bit. In the meantime check out this great guide on how to do it.
      maciejwalkowiak.com/blog/publish-java-library-maven-central/

  • @rabah4306
    @rabah4306 7 месяцев назад +1

    Thanks you sir !
    can you do a video about @transction how spring handle them ?
    you are doing a wonderful job :)

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

    Thank you for providing such amazing content 💙

  • @theblueplanet3576
    @theblueplanet3576 3 месяца назад

    Thanks for sharing. Learnt a lot from the video. 🙏
    I have a suggestion on video. Sometimes your profile blocks the code in the IDE and it is a bit annoying.

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

    Please make a video on how spring initialiser works

  • @yevgeny3985
    @yevgeny3985 4 месяца назад

    great video,!
    is there a more elegant way to write tests?

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

    THAAAANKSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @rmcdouga23
    @rmcdouga23 7 месяцев назад

    Would love to see how to push this to Maven central. Also, understanding how/why someone might break it up into multiple projects. I’ve written some Spring Boot starters before and I have used the multiple project approach, but if I’m honest, I’m not sure why someone would break the starter project away from the autoconfigure project. Any insights would be helpful.

  • @mehdi9771
    @mehdi9771 7 месяцев назад +1

    First comment , thanks for your ultimate efforts

  • @Anbu_Sampath
    @Anbu_Sampath 7 месяцев назад +1

    Instead of spring-boot-starter-web use spring-boot-starter and add spring-web as additional dependency(jps just relay on RestClient), this way jps-starter can be used with console application as well. Otherwise need to configure the property mark none web application.

    • @Anbu_Sampath
      @Anbu_Sampath 7 месяцев назад

      May be in next major Spring Framework(7) release, client related classes extracted into separate jar(spring-web-client).

    • @diegososa1367
      @diegososa1367 12 дней назад

      Im also trying to find how to add more dependencies.
      If I dont have the dependencies on the main project, which is importing the lib, then it throws some errors

  • @matadorxp1
    @matadorxp1 7 месяцев назад

    Hi Dan, good videos!! do you have a video where explain how to manage the session in the browser with oauth2(Bearer)?

  • @MarioKusek
    @MarioKusek 4 месяца назад

    If I want to have JPA repository in starter. How can autoconfiguration pick it up? Are somewhere examples of that?

  • @KhoaNguyen-mv2mu
    @KhoaNguyen-mv2mu Месяц назад

    Many thanks sir. could you please tell me what IDE are you using? I guess it is Intellij Idea but I am not sure.

  • @afoxjones7113
    @afoxjones7113 4 месяца назад

    How can i make mi own endpoints like in a normal app, i'm trying with a restcontroller but i can't

  • @martinkro2556
    @martinkro2556 7 месяцев назад +1

    Nice

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

    cool

  • @ruslansimakov9087
    @ruslansimakov9087 7 месяцев назад +1

    Sorry, I don't understand where did you store 200 todos?

    • @DanVega
      @DanVega  7 месяцев назад +1

      I didn't store them anywhere. They are coming from the JsonPlaceholderService and I am retrieving them by calling the REST API.

    • @ruslansimakov9087
      @ruslansimakov9087 7 месяцев назад

      so how the starter would help you if you don't have internet?

    • @mehmetakiftansk8448
      @mehmetakiftansk8448 7 месяцев назад

      @@ruslansimakov9087 Imagine that you are going to write a Util-starter that will include some custom Math functions for your company. And your colleagues should use those functions in their java services. Instead of writing those functions they will simply add ur starter into their pom and they can use everything they need from ur starter. Dan is showing with client that sends request to some api but you do not have to. 🫡

  • @smormanyak
    @smormanyak 4 месяца назад

    It would be better for testing if you check that Spring Boot takes "org.springframework.boot.autoconfigure.AutoConfiguration.imports" file and then picks up classes with @AutoConfiguration specified there... I'm currently thinking how to do that )

  • @mehmetakiftansk8448
    @mehmetakiftansk8448 7 месяцев назад +2

    Thank you so much for this great video Dan. Would be good if we can push it to maven central in the upcoming videos 🎉

    • @DanVega
      @DanVega  7 месяцев назад +2

      I will get to that one when I can but until then check out this great article on how to do it
      maciejwalkowiak.com/blog/publish-java-library-maven-central/