Annotations in Spring boot with Explanation| Spring boot Interview Questions and Answers Code Decode

In this video of code decode we have explained about Annotations in Spring boot. Annotations in spring boot is very important Interview in Spring boot interview questions and answers.
Udemy Course of Code Decode on Microservice k8s AWS CICD link:
openinapp.co/udemycourse
Course Description Video :
yt.openinapp.co/dmjvd
Spring boot annotations
Spring Boot is the most popular Java framework. Spring Boot built upon spring framework. It minimize the amount of configuration and boilerplate code you need to get started.
The Java provided support for Annotations from Java 5.0.
Prior to that, the behavior of the Spring Framework was largely controlled through XML configuration. Today, the use of annotations provide us tremendous capabilities in how we configure the Spring Framework.
Spring Annotations are a form of metadata. Annotations are used to provide supplemental information about a program. It does not have a direct effect on the operation of the code they annotate. It does not change the action of the compiled program.
@SpringBootApplication
It is a combination of three annotations
@EnableAutoConfiguration,
@ComponentScan, and
@Configuration.
if you see at their parent packages:
org.springframework.boot.autoconfigure.EnableAutoConfiguration
org.springframework.context.annotation.Configuration
org.springframework.context.annotation.ComponentScan
So we can say this Spring boot annotations can’t exist on its own. It needs spring framework annotations to work.
Annotations on annotations-@Target
@Target tag is used to specify at which type, the annotation is used.
The java.lang.annotation.ElementType enum declares many constants to specify the type of element where annotation is to be applied such as TYPE, METHOD, FIELD etc. Let's see the constants of ElementType enum:
Element Types Where the annotation can be applied
TYPE class, interface or enumeration
FIELD fields
METHOD methods
CONSTRUCTOR constructors
LOCAL_VARIABLE local variables
ANNOTATION_TYPE annotation type
PARAMETER parameter
Annotations on annotations-@Retention
@Retention annotation is used to specify to what level annotation will be available.
RetentionPolicy.SOURCE - refers to the source code, discarded during compilation. It will not be available in the compiled class.
RetentionPolicy.CLASS refers to the .class file, available to java compiler but not to JVM . It is included in the class file.
RetentionPolicy.RUNTIME refers to the runtime, available to java compiler and JVM .
Annotations on annotations-@Inherited @Documented
By default, annotations are not inherited to subclasses. The @Inherited annotation marks the annotation to be inherited to subclasses.
The @Documented Marks the annotation for inclusion in the documentation.
@Configuration
Tags the class as a source of bean definitions for the application context.
Point to note-
The main application class is also a bean, as it's annotated with @Configuration, which is a @Component.
@EnableAutoConfiguration
The @EnableAutoConfiguration annotation enables Spring Boot to auto-configure the application context. Therefore, it automatically creates and registers beans based on both the included jar files in the classpath and the beans defined by us, implicitly @EnableAutoConfiguration annotation, which makes Spring Boot create many beans automatically, relying on the dependencies in pom.xml file.
For example, when we define the spring-boot-starter-web dependency in our classpath, Spring boot auto-configures Tomcat and Spring MVC.
If you have added tomcat-embedded.jar then it tries to intellectually configure TomcatServletWebServerFactory if you do not have specified explicitly as ServletWebServerFactory bean. Hence, this auto-configuration has less precedence in case we define our own configurations.
Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
Advance Java Interview Questions and Answers : • Advance Java Interview...
Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
Spring Boot Interview Questions and Answers : • Advance Java Interview...
Angular Playlist : • Angular Course Introdu...
SQL Playlist : • SQL Interview Question...
GIT : • GIT
Subscriber and Follow Code Decode
Subscriber Code Decode : kzread.info?...
LinkedIn : / codedecodeyoutube
Instagram : / codedecode25
#codedecode #Springbootannotations #springbootinterviewquestionsandanswers

Пікірлер: 132

  • @CodeDecode
    @CodeDecode2 жыл бұрын

    Hey Guys, In this video we have covered very important and very in-depth concepts of spring boot annotations. So please watch this video till very end as it will indirectly cover many interview questions of Spring boot annotations. Also please like share and subscribe and let us know in the comment sections if you want us to create second part of Spring boot annotations

  • @purushotham8546

    @purushotham8546

    2 жыл бұрын

    Thank you for all your efforts, your videos really helped me to gain confidence before going to the interview. Please create a continuation video for this video as well.

  • @sukunkusum1720

    @sukunkusum1720

    2 жыл бұрын

    Thanks for ur efforts its really informative. please do such videos more. and please cover how to convert existed project to spring boot application. Thankful for what you are doing.

  • @bhavikjoshi1561

    @bhavikjoshi1561

    Жыл бұрын

    please create second part for this. thank you

  • @shwetaskatta8464

    @shwetaskatta8464

    Жыл бұрын

    Hi @codeDecode Can please make one video on full spring boot interview question with live example for experience people. As I saw you made video on annotation only.so try to make video on other parts also. Please make soon🙏🏻

  • @malleswarrao3887

    @malleswarrao3887

    Жыл бұрын

    Hi can you give me the video URL for spring cloud config server example

  • @tejasraje2672
    @tejasraje26722 жыл бұрын

    I cracked 2 interviews within a week after watching your entire interview series. You're a savior for Java Developer Interviews. Thanks a lot and i urgue you to make more such video's on advanced java and spring boot concepts

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Many congratulations Tejas. Very well deserved 👏👏👏👏keep learning keep growing Man 🙂🙂👍👍

  • @tejasraje2672

    @tejasraje2672

    Жыл бұрын

    Hi@@poorvakatyal2477 . I've 1.5 years in java springboot

  • @santhoshPatels

    @santhoshPatels

    Жыл бұрын

    @@tejasraje2672 which company teja

  • @rushikeshgodase8498

    @rushikeshgodase8498

    Жыл бұрын

    Could you please tell me which interview series you are talking about, there multiple series available on this channel?

  • @saphalvecham5539

    @saphalvecham5539

    Жыл бұрын

    @@rushikeshgodase8498 kzread.info/dash/bejne/gqud16OekqbYpbw.html

  • @MehulSamaiya
    @MehulSamaiya Жыл бұрын

    To be very honest for annotations i searched for so many videos but was unable to understand it clearly and after going through your video its now crystal clear. Thanks a lot, u r doing a good work keep it up....toodles.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Mehul🙂🙂👍

  • @rajeevsai91
    @rajeevsai912 жыл бұрын

    Thank you very much for this video. I have been seeing these basic annotations from sometime now, but never understood what each thing does. I got more clarity now. Please continue with this series. Thank you for helping all the confused developers like me.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Been though the same situation. Hence decided to create a video to clarify many developers like us 🙂🙂. Thanks for supporting us and motivating us . Means a lot Rajeev 🙂👍

  • @rajeevsai91

    @rajeevsai91

    2 жыл бұрын

    @@CodeDecode thank you for your reply and assurance. 🙏🏻

  • @re5gow2
    @re5gow229 күн бұрын

    Thank you! This is very helpful. I learned so much more about spring boot with this video and this is just one spring boot annotation.

  • @sproutboot
    @sproutboot Жыл бұрын

    Definitely I want you to cover more-! I love your explanation. Always your explanation is very clear. easy to understand. I like when you show us related demo

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks a lot Lee🙂🙂

  • @amanbagdi3425
    @amanbagdi34252 жыл бұрын

    The internal working of annotations is explained very well, please continue on it and cover the other annotations as well like @Autowired n all. Thanks 😊.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot Aman. Sure we will do that🙂👍

  • @ashwinvarma9349
    @ashwinvarma9349 Жыл бұрын

    Really a big fan of the way you teach! Thanks a lot!

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks a lot Ashwin 🙂🙂

  • @monikashukla5072
    @monikashukla50722 жыл бұрын

    Yes please cover the rest of the questions, it will help!

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure thanks Monika for showing us the way to proceed with. 🙂👍

  • @hariomkumar163
    @hariomkumar1632 жыл бұрын

    Thanks mam! You are life saver with so many interview questions 🙌

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot Hariom. We are glad to be. We will keep posting such videos 🙂👍

  • @sachinvm1319
    @sachinvm1319 Жыл бұрын

    One of the best video I have seen explaining how the spring boot application works internally with all these annotations. Please request u to cover the rest of the annotations, that would really help your subscribers. Thanks again

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Sachin sure 👍

  • @dgcrush2000
    @dgcrush20002 жыл бұрын

    Thanks a lot, it's a great help for learners, please continue with remaining annotations

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks chandr. 🙂👍. Sure we will continue this series

  • @jonasjanaitis436
    @jonasjanaitis436 Жыл бұрын

    I don't know, but for me, these lessons are pure gold.

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Jonas 🙂🙂

  • @praveenpippala1383
    @praveenpippala13832 жыл бұрын

    very useful content waiting for next video

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot praveen 🙂👍

  • @yatendrasingh6847
    @yatendrasingh68472 жыл бұрын

    wonderful explaination , i got from your interview series pls make more videos on the subsequent topics, Today i found your channel and got subscribed in half of the video ,best content on you tube to the point with great depth of the topic.thanks

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot Yatendra 🙂means a lot to us👍🙂

  • @rocker31590
    @rocker315902 жыл бұрын

    Yes please post videos for the other upcoming topics as well

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Prabakar 🙂👍

  • @shail1396
    @shail13962 жыл бұрын

    Thanks for your efforts. Please do continue this series. Can u please share this document that can be really helpful for us.

  • @uddeshyajaiswal8574
    @uddeshyajaiswal85742 жыл бұрын

    Thanks for this knowledgeful video. please continue more of this...

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Uddeshya. Sure we will do that 🙂👍

  • @ah4303
    @ah43032 жыл бұрын

    Thanks for your efforts. Please do continue this spring boot annotations series.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure. Thanks a lot for helping us decide the priority. Means a lot, 🙂👍

  • @rocker31590
    @rocker315902 жыл бұрын

    Great work. Thanks!

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot Prabakar 🙂👍

  • @santoshkamat6132
    @santoshkamat61322 жыл бұрын

    You doing a great job. Could you bring up a series on JMS , ActiveMq, RabbitMq, Kafka , etc in combo with Spring Boot. Would be very helpful. Not many videos on KZread of JMS in combo with spring boot

  • @priyanka0222

    @priyanka0222

    2 жыл бұрын

    What is com.sun.proxy.$proxy.i got this as runtime exception.what to resolve this exception.

  • @harshadaraut4096
    @harshadaraut40962 жыл бұрын

    Thanks for this video ...please continue on this

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure harshada

  • @ravikanthgande8860
    @ravikanthgande88602 жыл бұрын

    Awesome one, really appreciate your efforts

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot Ravi 🙂👍

  • @Vithal_Nivargi
    @Vithal_Nivargi2 жыл бұрын

    Thank you mam , which i was waiting for such videos.... 😊

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    You're welcome

  • @rachamallidorasrivignesh4499
    @rachamallidorasrivignesh44992 жыл бұрын

    Superb explanation madam tq so much the way of explaining is easy to understand ur all vedeos are so helpful .

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot 🙂👍

  • @milanfaizal
    @milanfaizal Жыл бұрын

    This is amazing. So deep

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks

  • @bhuvanakuppusamy6933
    @bhuvanakuppusamy69332 жыл бұрын

    Excellent ma.. detaily explained . Really appreciate it. . Pls do cover all other topics. . . . Thanks for your videos. .

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks a lot Bhuvana 🙏🙏. Sure we will cover more annotations in next videos

  • @ArjunSingh-is1bg
    @ArjunSingh-is1bg2 жыл бұрын

    This Video is really helpful, Currently i am working on spring i have one have diffculty is , I have to thought much more about the configuration in the Spring and then Spring Boot comes and make alll the automation and reduce the boiler plate code and make life of the Java Developer Easy.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    So glad to hear that u are able to feel it on job. Apply and learn as much as you can Arjun. We can see you are perfectly on the right track. You will for sure land at your dream job with such worthy knowledge you are gaining day by day 🙂👍 keep learning keep growing Man. Glad to see this 👏👏👏👏

  • @ArjunSingh-is1bg

    @ArjunSingh-is1bg

    2 жыл бұрын

    @@CodeDecode Tq Mam, You Also So supportive in my journey of the Java Developer.🙂🙏

  • @arshpreetsingh2417
    @arshpreetsingh24172 жыл бұрын

    most useful channel for interview preparations, cleared the interview of a very good product based company with the help of your videos. Thanks a lot mam for providing such useful content🙏🙏 Keep creating such useful videos👍

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks for the nice words arshpreet

  • @neerajmittal6060
    @neerajmittal60602 жыл бұрын

    Thanks for the great videos Mam. Can you create a series on handling database transactions when a call go through multiple micro services? And each micro service has its own database.

  • @khushboobhalawat7196
    @khushboobhalawat71962 жыл бұрын

    Please do create. Your videos are quite helpful. You elaborate in details.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Khushboo 🙂👍

  • @akashsaha9366
    @akashsaha93662 жыл бұрын

    Yes please cover the required beans or annotations of spring boot

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Akash 🙂👍

  • @shivakarthikeyan2131
    @shivakarthikeyan21312 жыл бұрын

    500th Like Im Giving... 👍

  • @Prakash-gz6py
    @Prakash-gz6py2 жыл бұрын

    Yes, please cover the rest of the annotations.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure thanks Prakash 🙂👍

  • @nabinghoshmaths6834
    @nabinghoshmaths68342 жыл бұрын

    Please upload complete annotation interview questions of spring boot application. Thanks alot for making such good contents❤️

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure 🙂👍

  • @vidyab706
    @vidyab706 Жыл бұрын

    Please mam,cover remaining part as well,it would be helpful,thank you so much for your wonderful content,thanks a ton😀😊

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks Vidya 🙂

  • @rishabhsharma7207
    @rishabhsharma72072 жыл бұрын

    Big fan of you ma'am. Can you please share these slides as well for further revision.

  • @AshishSingh-rx4sq
    @AshishSingh-rx4sq2 жыл бұрын

    And thanks for making this.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    you're welcome

  • @er.sahilmd
    @er.sahilmd2 жыл бұрын

    Yeah it's in right direction. Please cover other part also..

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    sure we will cover it soon

  • @ravi3743
    @ravi37432 жыл бұрын

    Thank you it's really useful. Please do more videos on @annotations

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure ravi

  • @rajashekar-bu8xd
    @rajashekar-bu8xd2 жыл бұрын

    Very useful video..

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Shekar 🙂👍

  • @SarthakMandlik
    @SarthakMandlik2 жыл бұрын

    please make a video for how to retrieve value from hashmap having same index number.

  • @sourabhjinde8191
    @sourabhjinde81912 жыл бұрын

    This is by far the best youtube channel for interview preparation. Thank you so much. Please create second part of this series.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    This means a lot to us sourabh. 🙂🙂🙂🙂. You made our day with such comments. It helps us to be motivated and post more such content 🙏🙏🙏🙏

  • @sachinjadhav8759
    @sachinjadhav87592 жыл бұрын

    Awesome

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Sachin 🙂

  • @srinivassiddharth1017
    @srinivassiddharth10172 жыл бұрын

    Waiting for part 2 of this video

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure we will upload it soon

  • @vazzdoin
    @vazzdoin2 жыл бұрын

    Wonderful explanation. Thanks for sharing the annotations tutorial, it cleared lot of doubts. I've one suggestion, your voice is very loud in all your videos, it feels like you are shouting. It seems you are a teacher and are habitual to speaking loud while teaching in the class but in the video it feels a bit screeching to the ears and hence not required. Please try to curb that habit if you are delivering for the video only.

  • @abhi007rider
    @abhi007rider2 жыл бұрын

    Please more videos on microservices, design patterns

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure we will upload soon

  • @hrithiksonu5836
    @hrithiksonu5836 Жыл бұрын

    Mam Please make a video on how to explain a project based on springboot + mysql + java + with any frontend... As i dont have perfect idea on my entire project flow.

  • @shubhamvishwakarma2198
    @shubhamvishwakarma2198 Жыл бұрын

    Great explanation. Your voice sounded little hyper. Please stay calm while making videos.

  • @venkyvenky1747
    @venkyvenky1747 Жыл бұрын

    Thanks ma

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    🙂👍

  • @amarthyaseshu683
    @amarthyaseshu6832 жыл бұрын

    @ThanksForSharing

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Thanks Amarthya 🙂👍

  • @ruchigupta9811
    @ruchigupta98112 жыл бұрын

    Can you please make a video on advance multithreading questions.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Ruchi. We will do that🙂👍

  • @prathappoojary8585
    @prathappoojary85852 жыл бұрын

    Do the video of clients round interview 🙏

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    That's a very nice topic we will surely cover it in coming future

  • @harishpasala5138
    @harishpasala51382 жыл бұрын

    Hi Mam, Hope you’re well. I cracked many interviews because of u. Now i am confused to join between American Express and EY. Can you pls help me to decide which one is better. How is job security at Amex??

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Hey hi Harish. First of all many congratulations on clearing both. As far as our experience says, company never matters what really matters is the project. If project is good your life is smooth as butter . But if project is not as per the expectations your life will become hell. Avoid toxic it culture . Ask about the tech stack and client you will work with closely. If stack is good u will learn new things and will never feel stagnated . Go ahead and ask for the project and tech stack . All the best Harish . You will rock 🙂👍👍👍

  • @bharanitechsolutions
    @bharanitechsolutions2 жыл бұрын

    Please make a video on spring data jpa

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure Mahi. We wll do that 🙂👍

  • @priyanka0222
    @priyanka02222 жыл бұрын

    What is com.sun.proxy.$proxy. I got this as runtime exception.how to resolve this exception.

  • @suriyanarayanan2406
    @suriyanarayanan24062 жыл бұрын

    Can you share some scenario based java interview questions

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure what kind of scenerios you need?

  • @nabinghoshmaths6834
    @nabinghoshmaths68342 жыл бұрын

    Please upload remaining annotations those filters annotations...🥺

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    Sure nabin we have uploaded one more video please check that out

  • @AshishSingh-rx4sq
    @AshishSingh-rx4sq2 жыл бұрын

    Please make a video on apache kafka tutorial.

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    sure we will upload this video in near future

  • @AshishSingh-rx4sq

    @AshishSingh-rx4sq

    2 жыл бұрын

    @@CodeDecode thanks.

  • @harshadaraut4096
    @harshadaraut40962 жыл бұрын

    Will you make video on SpringBoot application Deployment process

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    sure we will create it in future

  • @nishameeran6493
    @nishameeran6493 Жыл бұрын

    Hi Mam. I am a house wife mother of 3. Now I got a opportunity to enter the software field as basic Java and spring boot developer. Can you help me what are the expected topics that I need to cover.? Do I have to do more practice on coding or just the concepts..?

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Prepare well with all concepts thoroughly. Because with some gaps its very difficult to start again. We know thoughtworks is one who gives mothers with gaps to join back. Try that👍🙂

  • @breddy5215
    @breddy52152 жыл бұрын

    Hi, when can we expect the next part?

  • @CodeDecode

    @CodeDecode

    2 жыл бұрын

    we have uploaded it yesterday

  • @Khushi-xw6ie
    @Khushi-xw6ie11 ай бұрын

    Could you please share the slides used in the video?

  • @mounikakoduri8041
    @mounikakoduri8041 Жыл бұрын

    Do you give trainings as well?

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Not yet Mounika. We all are full time developers at MNCs. Hardly get time to create videos even. Sorry. What do u need??❤❤.

  • @srinivasamovva2735
    @srinivasamovva2735 Жыл бұрын

    You are so cute.. We all so greatful to you

  • @CodeDecode

    @CodeDecode

    Жыл бұрын

    Thanks 🙂🙂

  • @syedasheeba24
    @syedasheeba242 ай бұрын

    Speaking too fast..

  • @CodeDecode

    @CodeDecode

    2 ай бұрын

    We will reduce the pace👍