• +91 9723535972
  • info@interviewmaterial.com

Spring Interview Questions and Answers

Question - What do you mean by  Annotation-based container configuration?

Answer -

Instead of using XML to describe a bean wiring, the developer moves the configuration into the component class itself by using annotations on the relevant class, method, or field declaration. It acts as an alternative to XML setups. For example:

  1. @Configuration
  2. public class AnnotationConfig
  3. {
  4. @Bean
  5. public MyDemo myDemo()
  6.  { return new MyDemoImpll(); }
  7. }

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners