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

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 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 8 หลายเดือนก่อน +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.

    • @shivakumartharigoppula6118
      @shivakumartharigoppula6118 3 ปีที่แล้ว +3

      Yes Bro...I was looking for these comment.

    • @prathamchapla
      @prathamchapla ปีที่แล้ว

      thank you

    • @kartikagrawal5399
      @kartikagrawal5399 ปีที่แล้ว

      Than can we add @required in constructor injection?

    • @dataismoney
      @dataismoney ปีที่แล้ว

      @@kartikagrawal5399 No we can't....only we can use in setter injection

  • @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 ❤

  • @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

  • @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!!

  • @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

  • @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

  • @sowmyadevi3661
    @sowmyadevi3661 ปีที่แล้ว

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

  • @hardikseth9640
    @hardikseth9640 2 ปีที่แล้ว

    your way teaching is fantastic

  • @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!

  • @kumudkishor9460
    @kumudkishor9460 ปีที่แล้ว

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

  • @prakashbawge3688
    @prakashbawge3688 4 ปีที่แล้ว

    One of the best teaching style u have got sir

  • @souravkumar4372
    @souravkumar4372 6 ปีที่แล้ว

    Very useful video Thanks for that.

  • @prabukumar7643
    @prabukumar7643 4 ปีที่แล้ว

    Nice Explanation. Thank you so much Abhilash.

  • @hkkabir2024
    @hkkabir2024 2 ปีที่แล้ว

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

  • @jayakumar6091
    @jayakumar6091 4 ปีที่แล้ว +3

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

  • @mrperfect7209
    @mrperfect7209 ปีที่แล้ว +1

    Love you course from odisha ❤

  • @yatendrasingh6847
    @yatendrasingh6847 2 ปีที่แล้ว

    best video and thanks for this bhaiya

  • @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 :)

  • @satweek123
    @satweek123 4 ปีที่แล้ว

    great explanation. Thank You

  • @yogeshnarwade3569
    @yogeshnarwade3569 5 ปีที่แล้ว +2

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

  • @meetsaurabhtiwari
    @meetsaurabhtiwari 6 ปีที่แล้ว +6

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

    • @SeleniumExpress
      @SeleniumExpress  6 ปีที่แล้ว +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 6 ปีที่แล้ว

      @@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

  • @simm5622
    @simm5622 2 ปีที่แล้ว

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

  • @yugalchaudhari5991
    @yugalchaudhari5991 4 ปีที่แล้ว

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

  • @atuljforce
    @atuljforce 8 หลายเดือนก่อน

    Thank yo soo much sir for this content.

  • @MrDhruv1123
    @MrDhruv1123 3 ปีที่แล้ว

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

  • @fafunmotavines
    @fafunmotavines 5 ปีที่แล้ว

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

  • @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 !!!!

  • @kkumar-r9g
    @kkumar-r9g ปีที่แล้ว

    super brother for your assignment👍

  • @sudhagars641
    @sudhagars641 4 ปีที่แล้ว

    Thank you so much for amazing videos bro

  • @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

  • @sdmj730
    @sdmj730 3 ปีที่แล้ว

    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 !!!!!!!

  • @theb2ube
    @theb2ube 3 ปีที่แล้ว +2

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

  • @christiangyaban9666
    @christiangyaban9666 3 ปีที่แล้ว

    Excellent...thanks

  • @100amankaushik
    @100amankaushik 4 ปีที่แล้ว

    Amazing videos 👌 could you please.upload videos on Webservice

  • @rushikeshpatil8384
    @rushikeshpatil8384 4 ปีที่แล้ว

    Excellent Teaching Skill....

  • @arulmozhikarunanidhi1948
    @arulmozhikarunanidhi1948 ปีที่แล้ว

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

  • @yemisrachmekuria3907
    @yemisrachmekuria3907 4 ปีที่แล้ว

    nice and clear explanation

  • @moncifabdeljalilhmaimou4350
    @moncifabdeljalilhmaimou4350 ปีที่แล้ว

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

  • @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

  • @techgyan6233
    @techgyan6233 4 ปีที่แล้ว

    I have completed the task and I will sending u

  • @okono251
    @okono251 5 ปีที่แล้ว +2

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

  • @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?

  • @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.

  • @brijsingh7200
    @brijsingh7200 5 ปีที่แล้ว

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

  • @priyabiradar9299
    @priyabiradar9299 5 ปีที่แล้ว

    Superb very helpful vedio ...

  • @bharukatta
    @bharukatta 5 ปีที่แล้ว

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

  • @ashokmandadi
    @ashokmandadi 5 ปีที่แล้ว

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

  • @sans5306
    @sans5306 4 ปีที่แล้ว

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

  • @saeednazary3111
    @saeednazary3111 5 ปีที่แล้ว

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

  • @reshmabanunadaf2849
    @reshmabanunadaf2849 2 ปีที่แล้ว +1

    I loved the tutorials, they are awesome :)

  • @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...

  • @michaelcuriba9574
    @michaelcuriba9574 3 ปีที่แล้ว

    Great Video, appreciate it.

  • @AnilKumar-ix2et
    @AnilKumar-ix2et 10 หลายเดือนก่อน

    Thanks bro for yhe video

  • @afreenanjum1817
    @afreenanjum1817 2 ปีที่แล้ว

    God bless you 🙂

  • @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.

  • @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🙂

  • @vishwajitsingh9684
    @vishwajitsingh9684 4 ปีที่แล้ว

    I really appreciate your kind support to learn online.

  • @himabindukolle7544
    @himabindukolle7544 2 ปีที่แล้ว

    Lots of love ❤️ for your effort

  • @shaikhameed766
    @shaikhameed766 5 ปีที่แล้ว +1

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

  • @kartikagrawal5399
    @kartikagrawal5399 ปีที่แล้ว

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

  • @laxmireddy4927
    @laxmireddy4927 4 ปีที่แล้ว

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

  • @sarathkumarpgm
    @sarathkumarpgm 3 ปีที่แล้ว

    Your awesom bro❤... I loved your videos

  • @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 :)

  • @ruplal8214
    @ruplal8214 6 ปีที่แล้ว

    Useful video, plz upload next #8

  • @susantdash
    @susantdash 6 ปีที่แล้ว +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.

  • @puneetmasali7517
    @puneetmasali7517 3 ปีที่แล้ว

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

  • @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?

  • @Titali-nv8lw
    @Titali-nv8lw 4 ปีที่แล้ว

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

  • @dakshu11
    @dakshu11 5 ปีที่แล้ว +1

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

    • @SeleniumExpress
      @SeleniumExpress  5 ปีที่แล้ว +2

      I am taking this as a compliment 😃

  • @siddharthchauhan2925
    @siddharthchauhan2925 2 ปีที่แล้ว

    Hi Abhilash, can you suggest books for Java backend.

  • @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.

  • @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.

  • @vickyraj541
    @vickyraj541 6 ปีที่แล้ว

    realy helpful for me & everyone

  • @bosevenkat
    @bosevenkat 5 ปีที่แล้ว

    Excellent explanation on spring IOC Abhilash. Expecting spring mvc course

  • @sundharesanmohan2816
    @sundharesanmohan2816 3 ปีที่แล้ว +1

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

  • @priyabiradar9299
    @priyabiradar9299 5 ปีที่แล้ว

    Superb very nice ..

  • @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.

  • @meenakshi9624
    @meenakshi9624 ปีที่แล้ว

    you are doing soo good bro

  • @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

  • @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?

  • @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?

  • @veera.akasapu
    @veera.akasapu 3 ปีที่แล้ว

    Thank you big brother

  • @gender121
    @gender121 6 ปีที่แล้ว

    A very Good Work...Appreciated!

  • @Xbox_StreamDeck
    @Xbox_StreamDeck 4 ปีที่แล้ว

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

  • @mathanasekarg9297
    @mathanasekarg9297 ปีที่แล้ว

    Great Bro.....

  • @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.

  • @ankitshah4211
    @ankitshah4211 5 ปีที่แล้ว +2

    Can u provide spring boot tutorial to us

  • @Saravanan-lj9so
    @Saravanan-lj9so 5 ปีที่แล้ว

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

  • @mcq2427
    @mcq2427 5 ปีที่แล้ว

    bro teaching skill is so good ,plz upload SPRING AOP videos

  • @Chinnachinnu-wv6hx
    @Chinnachinnu-wv6hx ปีที่แล้ว

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

  • @sheetalsingh6590
    @sheetalsingh6590 4 ปีที่แล้ว

    Do you have JDBC tutorials as well in your channel?

  • @UmeshPatilVlogs
    @UmeshPatilVlogs 4 ปีที่แล้ว

    I HAVE NO WORDS.....THANK YOU

  • @piyushmajgawali1611
    @piyushmajgawali1611 4 ปีที่แล้ว

    Great