ConfigurationProperties explained - Microservice configuration with Spring Boot [06]

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

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

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

    Ingenious! A very welcome alternative to numerous tutorials that focus on syntax ("put @... in your file"). Instead, we are given a perspective on what (and why) you can (and should) do with it.

  • @narendra9903
    @narendra9903 3 года назад +7

    I like the way when you say what are we going to discuss next and why we need it👌👌👌👌

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

    Your teaching method is just incredible Koushik sir, really fantastic. You have taught me alot.

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

    The way you explain simply awesome. I always prefer to watch your videos. Thanks a lot

  • @brotherly9058
    @brotherly9058 5 лет назад +3

    My best microservice mentor.

  • @dhruvsinghal3263
    @dhruvsinghal3263 4 года назад +1

    5:41 Changing String to Map gives error while starting server. Please check.
    Failed to bind properties under 'db.connection' to java.util.Map:
    Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map]
    Action:
    Update your application's configuration

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

    at 4:17 you returned dbsettings.hostport(). what if i want to return dbsetting ??It gives exception

  • @azharmobeen
    @azharmobeen 5 лет назад +2

    It's really good, manythings I don't know before but now definitely I'm gona use it.

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

    you are rockstar Koushik :-)

  • @imluckyig
    @imluckyig 3 года назад +1

    why are you not autowiring in the constructor?

  • @NikitaKorolev-l6b
    @NikitaKorolev-l6b Месяц назад

    Hey! Just had a thought about using records for these @ConfigurationProperties instead of a POJO. Could that be a thing (considering the immutability of records)

  • @sasunguyen7968
    @sasunguyen7968 25 дней назад

    Thank you for the great tutorial! ❤
    I have a question
    Is it good idea to have property of a list 1000 items configured as externalize
    This file is about 100kb
    My plan is to easily update items without restarting app and no additional storage
    Thank you.

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

    @
    Java Brains : are you using any UI plugins or you have created the UI ?

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

    @Value will check automatically for type match??

  • @mohammedshabbirahmed976
    @mohammedshabbirahmed976 3 года назад +1

    You are Awesome Bro You are A Hero You ROCK THE WORLD BRO YOU ARE SUPER AND THE BEST

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

    Hi Koushik, what browser extension you using to display the response as JSON/Raw Data/Headers

  • @maxisperera3024
    @maxisperera3024 4 года назад +3

    WOW nice bro !! all 3 courses are exceptionally good. but seems now the things have been changed with Spring Boot 2.4 specially latest Spring Cloud version (2020) does not support most Netflix technologies. Please provide a separate video to upgrade our self to latest Spring Boot and Spring Cloud. Thanks !!

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

    Merci, J'adore c'est super bien expliqué

  • @abeldaniel5711
    @abeldaniel5711 3 года назад

    Thank you for the lesson. Can you tell me the best way, if my property values are in db, and I want to load them up onto a spring bean on app startup.

  • @shivsharanmalage8812
    @shivsharanmalage8812 4 года назад

    I am using ConfigurationProperties and I have externalized these config values. Once I change value in git I’m calling actuator refresh endpoint to get latest value. If I send request to get updated values then it is failing intermittently. My app is deployed in pcf with 4 instance. Is it something like latest config got updated in few instance that’s why it is failing intermittently?

  • @bathulanagendra4621
    @bathulanagendra4621 5 лет назад +1

    Hi sir, if we change property value in properties file,do we need to restart the server in Uat or production server.

    • @kaushalmzp
      @kaushalmzp 4 года назад

      yes it needs restart.

  • @souvikadhikary8990
    @souvikadhikary8990 5 лет назад +3

    In DBSetting class, you changed the 'connection' datatype to 'Map' , Why? Will be automatically converted into Key-Value pairs ?

    • @kaushalmzp
      @kaushalmzp 4 года назад +1

      yes, that is what. After converting type to map, my things stopped working. Server refuse to start now but with String type it is working fine.

    • @tushargameswell
      @tushargameswell 4 года назад

      @@kaushalmzp You can add map properties in application properties by a different approach, like
      db.connection.username=xyz
      db.connection.password=abc

  • @iamrishigupta
    @iamrishigupta 3 года назад

    How to load different property file in spring boot each request dynamically
    ??

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

    Simply the best

  • @Azyro777
    @Azyro777 3 года назад

    I got an error : "No converter found capable of converting from type [java.lang.String] to type [java.util.HashMap]"
    I've added @Configuration and @ConfigurationProperties("db") at DbSettings class and added @Autowired at it's private property at controller class. Anyone having the same issue?
    (btw I'm using Java 16 and Spring Boot 2.5.1

  • @chinmaybhat7347
    @chinmaybhat7347 4 года назад

    How can I set a default value to @Configuration bean member variables?

  • @deveshmishra6611
    @deveshmishra6611 5 лет назад +1

    Nicely explained

  • @olehstepaniak2775
    @olehstepaniak2775 4 года назад

    Hi, in your tutorial you had my.some and my.list.values. How we can create @ConfigurationProperties("my") class? How to resolve my.list.values?

    • @java-bro
      @java-bro 2 года назад

      use @Value annotation for this variable

  • @Crane_FISH
    @Crane_FISH 4 года назад +3

    Hi koushik, what are endpoints actually????

    • @kaushalmzp
      @kaushalmzp 4 года назад

      end point are nothing but some third party services URL to connect

  • @vgkarthi
    @vgkarthi 5 лет назад

    actuator is not working for me.. any clue..using gradle
    implementation 'org.springframework.boot:spring-boot-starter-actuator'

    • @Java.Brains
      @Java.Brains  5 лет назад

      Have you added the property value to expose all endpoints? I cover that in the video

    • @vgkarthi
      @vgkarthi 5 лет назад

      @@Java.Brains yes I did : management.endpoints.web.exposure.include: "*"

  • @Aditya-yn5lk
    @Aditya-yn5lk 5 лет назад

    Hi,
    Where can I save password?, I know it's not good to save cleartext password in property file and if I use jsypt, then I have to store password in sourcecode which is also not secure, Then where can I save it??

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

    what you have showed i only get how to print value which is present in application.properties in browser. what you have explained it is basic of basic you missed how we gonna use multiple connection in project by using those annotation

  • @VCNANI
    @VCNANI 5 лет назад

    Hi sir,
    Pls explain why get method not accepting requestBody in spring boot.
    If I use postman data will reach to request body
    If I use resttemplate data will be empty.
    Please explain me.
    I'm facing issue in production

    • @rishikesh2111
      @rishikesh2111 5 лет назад

      Use Post, you should not send requestbody with get.

    • @VCNANI
      @VCNANI 5 лет назад

      @@rishikesh2111 that is get method, If I use post , it is working fine. Get should accept request body any option is there

    • @VCNANI
      @VCNANI 4 года назад

      @Ikbel benabdessamad thanks for your reply.
      I tried that one, but it's not working.
      Get method doesn't support request body.

  • @SUMITKUMAR-il3ro
    @SUMITKUMAR-il3ro 5 лет назад +1

    Yehh Nice Explanation

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

    why not use @Bean instead of @Configuration. someone plz explain the diffrerence

  • @gibranmohammadkhan6216
    @gibranmohammadkhan6216 4 года назад

    I have two configurations. Let's say A & B. I want to load either one of them depending on some value in a properties file? Is it possible? Or any other way you know to load only one at a time? Thanks

    • @iamrishigupta
      @iamrishigupta 3 года назад +1

      Do you get the solution how to achieve this?

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

      got answer for this? if so, plz tell us

  • @derar9480
    @derar9480 4 года назад

    Why you used @Configuration instead of @ component to create a bean?

    • @konstantindobrinskiy9740
      @konstantindobrinskiy9740 4 года назад +3

      As, of Spring Boot 2.2, Spring finds and registers @ConfigurationProperties classes via classpath scanning. Therefore, there is no need to annotate such classes with @Component (and other meta-annotations like @Configuration) or even use the

  • @KyoukoEri
    @KyoukoEri 4 года назад

    If I have these two files:
    - application-prod[.]properties
    - application-stage[.]properties
    I want to change or switch towards the stage/test one but both have the same db properties in them.
    Will that work? Or how can I do the switch?

    • @kaushalmzp
      @kaushalmzp 4 года назад

      question is not clear Joyce. Please be clear.

  • @RaviBedre90
    @RaviBedre90 5 лет назад

    Nice Explanation....can we add each others channel as a featured channel? wanted to know your thoughts...

  • @Saurabhnaik
    @Saurabhnaik 4 года назад

    Thank you😃

  • @vg_3650
    @vg_3650 3 года назад

    For me application-.yml is not working. but application-.properties works. Is there anyone who is facing the same?

  • @jnsridhar
    @jnsridhar 4 года назад

    3:35 Configuration annotation may not be needed, ConfigurationProperties is enough, I think

  • @AjayKumar-fd9mv
    @AjayKumar-fd9mv 4 года назад

    Thanks

  • @TheRamsfeld
    @TheRamsfeld 5 лет назад +1

    I love you :D

  • @sahuanuj1
    @sahuanuj1 5 лет назад +1

    First View👍

  • @jeeperspeepers8323
    @jeeperspeepers8323 5 лет назад

    What?

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

    AWSOME
    LOL

  • @ManikantaKumarGudla
    @ManikantaKumarGudla 11 месяцев назад

    Hi,
    How to reload the properties in case of spring MVC (5.1.14 version in specific) ?