Injecting literal values from properties file using spring annotations || @value || @Required

Поділитися
Вставка
  • Опубліковано 8 жов 2024
  • This tutorial will guide you to inject literal values from properties file using spring framework. We will be using two annotations today. The first one is @value and the next one is @Required. Using the @value annotation we will be injecting value in Java side. Along with it we will be also learning how to load values from the properties file to spring configuration file(XML file). This will be one of the important things to learn as in the real world of spring application development, it’s pretty common that you will be doing things though properties file/property file.
    Keeping these things in mind, At the end of this tutorial we will be creating a real-time scenario and we will load values from a property file to our spring application to have some DB call(through a JDBC connection). Hope this tutorial will help you to move ahead with spring annotations as well because we will be using @Value and @Required annotation.
    Once we are done with this tutorial, we will be practicing most of the common spring core annotation in the next video.
    To avail my spring core framework course for free, stay tuned with my channel by subscribing and hitting the bell icon so that you will be notified each time I upload a new video to this running course.
    Please use this below link to subscribe me :
    / @seleniumexpress
    Access the complete spring core course by clicking the below link :
    • Spring Framework(Core)...
    --------------
    #Value #InjectingLiteralFromPropertiesFile #Required
    Stay tuned and like my Facebook page for more.
    / seleniumexpr. .
    Music :
    -----------
    credits : -
    Adventures by A Himitsu / a-himitsu
    Creative Commons - Attribution 3.0 Unported- CC BY 3.0
    creativecommons....
    Music released by Argofox • A Himitsu - Adventures...
    Music provided by Audio Library • Adventures - A Himitsu...
    -----
    intro template :
    / alexbau01

КОМЕНТАРІ • 269

  • @Crihighlets
    @Crihighlets 7 місяців тому +7

    In 2024 your videos are helping me understand the spring framework clearly as no other explanation videos. Which also make me learn spring boot much easier.

  • @archygupta
    @archygupta 4 роки тому +28

    I can see how tired your eyes are at the end of this tutorial. Really appreciate your hardwork.

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

      i know Im asking the wrong place but does someone know a method to log back into an instagram account?
      I somehow forgot the account password. I would appreciate any tips you can give me!

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

    4 years later of this video I'm following the course and doing your assignments. Thanks!

  • @surekhak4326
    @surekhak4326 2 роки тому +2

    Thank you very much ,i have gap of 10 yrs coz of family problems,now i updating by watching ur videos

  • @SamChaneyProductions
    @SamChaneyProductions 4 роки тому +19

    Thank you for this video. I'd like to add that since Spring 5.1, usage of @Required is deprecated, and you should instead just use constructor injection in place of setter injection if you have a required property.

  • @sundargautambabaji
    @sundargautambabaji 4 роки тому +10

    Your commitment to this tutorial is second to none. I am so happy to have a tutor like you.I just covered up more than 7 tutorial in this playlist and found much worthy .
    Thank your for this tutorial.Tutor like you are inspiring beginners like me to explore and understand programming languages in much easier way

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

      man i cannot set values dynamically from a file within intellij ide

  • @lokeshwaraachari6781
    @lokeshwaraachari6781 9 місяців тому +1

    Sir,you are teaching absolutely great.... hats off to your patience.... keep doing like this....these videos are very useful ❤

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

    When you say you were a Bad Student , I can relate as being a Back Bencher. Seriously , loving your concepts ..Keep up the good work Abhilash!! Cheers!!

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

    Very interesting and well explained..initially i am difficult to understand spring..after watching this video i get a confidence to do my new project..thanku sir for ur effort.and love the way you explained

  • @rohitkumar-ho1tj
    @rohitkumar-ho1tj 5 років тому +3

    I have just started with all your videos and trust me these are amazing. Able to understand easily. Thanks for these videos

  • @yasirmahomed4656
    @yasirmahomed4656 Рік тому +3

    On behalf of all students I salute you Teacher (Ustad). In the Muslim prayer 5 times a day we ask Allah swt to bestow blessings on the teacher. May you be blessed Teacher for the effort, the passion and dedication to disseminate beneficial knowledge!! The passion and dedication are evident in your videos. Thank you and zindabaad!

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

    You started from very basic and everyone can easily understand.
    Thank you Abhilash for making these concept easier.

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

      Can any one help me I'm stuck here
      I'm getting xmlns associated with element beans must be followed by = character

  • @kumudkishor9460
    @kumudkishor9460 Рік тому

    I found your videos as best videos on spring..you are great

  • @jayakumar6091
    @jayakumar6091 4 роки тому +3

    Love the way you explain all the concepts so clearly..
    very simple very straight forward
    love you ❤❤

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

    Your dedication is amazing. Thank you so much. 🏆🏆🏆🏆🏆

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

    One of the best teaching style u have got sir

  • @sowmyadevi3661
    @sowmyadevi3661 Рік тому

    amazing... Each and everything was very clear .. thank you so much....

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

    your way teaching is fantastic

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

    Hey When Will you make videos for Spring boot

    • @deeptigupta8346
      @deeptigupta8346 4 роки тому +4

      Hi Abhilash, Love your teaching style!! Looking forward videos on Spring Boot.

    • @Titali-nv8lw
      @Titali-nv8lw 4 роки тому +1

      Eagerly waiting for spring boot..Please upload ut fast. Please abhilash please. I request you.

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

      yes, we are waiting for spring boot tutorials :) . Happy coding !

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

      yes Abhilash

    • @RajaRaj-du6zm
      @RajaRaj-du6zm 3 роки тому +1

      Yes... upload spring boot vdo ASAP

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

    Awesome work! appreciate the hard work you put into making the videos.

  • @shivangipandey9278
    @shivangipandey9278 4 роки тому +3

    Wow!! Great efforts sir.. your teaching style is really good.. your videos make learning so much fun and interesting.. thanks a lot for these videos.. Also a request for you to upload spring boot videos.. there are many videos on spring boot on the internet but your teaching style is so unique and easy to understand.. really looking forward for it.. thanks in advance :)

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

    Awesome and hatsoff are the only words for such trainers... :-)

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

    You made our day Sir...!!! Thanks for giving deepest knowledge abt @Values and @Required and properyies file.

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

    man you are wonderful and kind of magic plz continue to your videos

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

    Love you course from odisha ❤

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

    Excellent Teaching Skill....

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

    best video and thanks for this bhaiya

  • @atuljforce
    @atuljforce 8 місяців тому

    Thank yo soo much sir for this content.

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

    love you broo!! have been searching for the perfect channel to learn spring from the past 10 days no body has taught me the way you did ..i know i am pretty late but i think i am good at it now...could you please help us with the spring boot as well

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

    Nice Explanation. Thank you so much Abhilash.

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

    I loved the tutorials, they are awesome :)

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

    Very useful video Thanks for that.

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

    great explanation. Thank You

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

    got it . i have made the connection to JDBC using xml configuration. as you have said

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

    You explanation is awesome sir..please provide video on spring-hibernate integration

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

    Amazing teaching style.........

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

    Great Video, appreciate it.

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

    Hi Abhilash, you working hard make us understand. Your spring knowledge is very good

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

    Thank you so much for amazing videos bro

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

    Hello Abhilash,
    I have watched your spring IOC tutorial, this is awesome way to teach us. Thank you so much Abhilash !!!!

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

    Excellent...thanks

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

    Superb very helpful vedio ...

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

    Hi Abhilash! I became a great fan of your teaching Mahnnn.....Awesome....I was struggling to understand spring for a long time.....I didn't understand the concepts and all...Here you come.....I'm watching the spring series of 74 videos and I'm in 8 Episode Video of Autowire....Awesome Teaching buddy......Please make more videos on the cloud...Microservices...and other backend technologies videos....Please.....You are my Spring Hero....!!!! Voilaaaaa......I don't have words to thank you enough......No words.....THANKS !!!!!!!

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

    Good Explanation,you are helping so many people regarding java,keep it up,God bless you

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

    Thank you so much for amazing videos, waiting for Spring MVC.

  • @kkumar-r9g
    @kkumar-r9g Рік тому

    super brother for your assignment👍

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

    Thank you so much for the videos ! really appreciate what your are doing .can you please do videos on what issues or challenges we face during selenium testing so that we can tell in the interview purpose

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

    Lots of love ❤️ for your effort

  • @Saravanan-lj9so
    @Saravanan-lj9so 5 років тому

    Thank you. I knew you are doing service for us. Thank you.

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

    nice and clear explanation

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

    God bless you 🙂

  • @akash89ful
    @akash89ful 3 роки тому +7

    Sir, I have observed that with field variable we can use only the @Value annotation and not the @Required annotation. If we do so, it gives BeanCreationException. we can have @Required at the setter method level only. Any thoughts on this please?

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

    I HAVE NO WORDS.....THANK YOU

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

    Thank you so much for amazing videos, they have cleared all the concepts related Spring IOC and DI.
    waiting for Spring MVC :)

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

    hello sir i love watching ur videos ....it is very very understandable.....can you please make a complete video on maven?
    I really need that video.

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

    I really appreciate your kind support to learn online.

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

    Thanks for your tutorials on spring and the way you explain is marvelous.please do a video on spring jdbctemplate

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

    realy helpful for me & everyone

  • @deepakgupta-it4qh
    @deepakgupta-it4qh 4 роки тому +1

    Your teaching is really awesome...thanks man🙂 to make me understand easy....can I expect J2EE and Spring boot videos🙂

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

    A very Good Work...Appreciated!

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

    Naming this course as "Head first Spring"👍👍👍

  • @AnilKumar-ix2et
    @AnilKumar-ix2et 10 місяців тому

    Thanks bro for yhe video

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

    Why we need to put "classpath:" in location attribute?
    This is also working fine!

    • @sudhashankarkj5283
      @sudhashankarkj5283 4 роки тому +5

      Because Spring does not know where to find the student-info.properties file. By mentioning "classpath:" the spring looks directly into the root of "src" folder.

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

    I have completed the task and I will sending u

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

    Hey Abhilash thanks to understanding me more clear about spring core and m requesting you to if possible please upload microservices videos at least how to start with microservices with spring boot.

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

    Thank you so much Abhilash..I can't stop asking this, but can you please let me know when you will be publishing spring mvc/hibernate videos..at least tentative date please...

  • @ARUNKUMAR-nl2nb
    @ARUNKUMAR-nl2nb 6 місяців тому +1

    Hi ,I have a question regarding on JDBC connection. I've encountered several exceptions while attempting to establish the connection, and I wanted to ask for your guidance. Should we first create the 'Product' database before attempting the connection? I want to ensure that I'm following the correct procedure.

    • @bhishma620
      @bhishma620 5 місяців тому

      yes, first you have to create database.

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

    Thanks for video#7
    Waiting for spring security and hibernate other video

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

      Sure, Saurabh.. Security videos are in queue but that will take time as I am covering spring mvc and spring boot next.
      Hibernate videos you can expect soon.

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

      @@SeleniumExpress sir I like your videos very useful please upload fast next and also about spring MVC too

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

      @@SeleniumExpress Looking forward to see them

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

      You are doing very good .

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

      Hi Abhilash when can we expect spring mvc and boot videos? We are waiting bro

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

    Thank you so much, this is so helpful!!!

  • @moncifabdeljalilhmaimou4350

    ty for ur video i have just one question @Required annotation is deprecated how i can make a property required in new version

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

    you make spring easy ...,-)))))

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

    Sir,After long time you uploaded video.Kindly upload video quickly.I need a job and I can get it from your video only.Thanks.

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

    AWESOME......AS USUAL!!!!!

  • @Chinnachinnu-wv6hx
    @Chinnachinnu-wv6hx Рік тому

    You are Awesome Man listening makes boring but you proved as that is Wrong...

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

    Great video! Thank you!

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

    Your awesom bro❤... I loved your videos

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

    abhi it is going to awesome explanation, please make videos on spring aop, spring security and logging.

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

    Sir ur teaching is super, sir can you explain these things with maven & annotations sir please sir 🙏🙏🙏

  • @arulmozhikarunanidhi1948
    @arulmozhikarunanidhi1948 Рік тому

    Thanks for your efforts... can you upload video for springboot

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

    Please make spring scope video ..if possible then ...thanks in advance for this

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

    Superb very nice ..

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

    Thanks Abhilash for Amazing Videos! Great work.
    @Required annotation is deprecated in Spring 5.1. Is there any other annotation which replaces @required?

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

    Great video man!! Thanks a lot.

  • @meenakshi9624
    @meenakshi9624 Рік тому

    you are doing soo good bro

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

    All the videos are really nice and useful for beginners, I have 1 doubt, what is the difference between setting annotations with field and setters, if I declare before field, then no need of setters. So what is the use of declaring annotation before setters.

  • @mathanasekarg9297
    @mathanasekarg9297 Рік тому

    Great Bro.....

  • @veera.akasapu
    @veera.akasapu 3 роки тому

    Thank you big brother

  • @100amankaushik
    @100amankaushik 4 роки тому

    Amazing videos 👌 could you please.upload videos on Webservice

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

    love cricket! okey now I can tell this! "bro, you look like manish pandey!"

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

    I love your explanation bro but people who are addicted to your explanation expects more videos on springboot and spring framework but you are not making it consistently thar why people are not keeping hopes on u r videos
    we are ready to take paid courses from you because we dont want to miss your indepth knowlede on each topics

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

    Can we apply @value annotation for reference variable (e.g. employee or address) at filed level or at setter method? When we apply the @value annotation at field level and remove the setter method then how internally Ioc inject it's value to field?

  • @kartikagrawal5399
    @kartikagrawal5399 Рік тому

    Does this playlist of 10 vedios completes the whole concept of spring framework?

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

    Abhilash, For declaring multiple placeholders in beans.xml , can we use this tag more then once?if yes then how? alternate method i found using commas we can declare multiple property file .But if want to explicitly define one file at a time then how to do that?

  • @AllinOne-et2on
    @AllinOne-et2on 4 роки тому

    Bro, u r really doing an excellent job.

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

    Thanks for that course. There something I still would like to know. Suppose I've a class (for instance User) and I need to create several beans from that class, to have available in the IOC. Unfortunately I cannot use @Component, that is the easiest way to get bean from Spring, so I've to use @Bean in the configuration Class. But for every bean I need to inject different values (for instance "billing code", "address", etc). How to manage all that in the annotation mode? (i.e. without using the xml config file). Thanks

    • @khajalieubarrie5088
      @khajalieubarrie5088 Рік тому

      I am sure by now you have figured it out but for anyone that may come along, here’s my answer to this question. You can define multiple User beans of the same type in the Config class. Since the name of each User bean or object will be different for the config class to compile, you will then refer to each specific bean you’ll want to use by the name use to define it in that class.

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

    Great

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

    Excellent bro.. keep going

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

    Excellent explanation on spring IOC Abhilash. Expecting spring mvc course

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

    Hi we are waiting for spring boot also, please make videos on it.

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

    Why don't you upload different type of webservices with code.different playlist pls.it's real
    useful.your work is awesome.