Loading

Q1.

Which is the default and most modern Spring configuration style?
A. XML
B. Java Config
C. Java Config + Annotations
D. Pure XML with DTD

Q2.

What does @Configuration do?
A. Defines XML beans
B. Enables component scanning
C. Marks a class as a Spring bean
D. Declares a Java-based configuration class

Q3.

Which annotation automatically creates a bean?

A. @Bean
B. @Component
C. @Autowired
D. @Inject

Q4.

Which configuration is MOST used in Spring Boot projects?

A. XML Only
B. Java Config Only
C. Annotation-Based Only
D. Java Config + Annotations

Q5.

Which element defines a bean in XML configuration?

A. <config>
B. <bean>
C. <class>
D. <component>