Spring Security
What are the major features of Spring 5?
Is Spring 5 compatible with older versions of Java?
What are the advantages of using Spring framework?
List the modules of Spring framework.
What is tight coupling?
What is loose coupling?
What is the purpose of application.properties file?
What is pom.xml file?
What design patterns are used in Spring framework?
What are some of the best practices for Spring Framework?
Describe some standard Spring events.
How does Spring 5 make use of JDK 9 modularity?
Inversion of Control (IoC)
What is Inversion of Control (IoC)?
What are the advantages of Inversion of Control?
What is the responsibility of an IoC container?
Describe the two types of IoC container.
Give an example of the BeanFactory implementation.
What is ApplicationContext?
Give examples of the ApplicationContext implementations.
What is the difference between BeanFactory and ApplicationContext?
How is ApplicationContext configured in Spring?
What is WebApplicationContext?
What happens if the context is not closed?
Dependency injection
What is dependency injection?
How is dependency injection related to inversion of control?
What are the types of dependency injection?
What is constructor injection?
How does setter injection work?
Explain setter injection for objects and literal values.
Explain injection of Java Collection types.
What is the difference between constructor and setter injection?
Which dependency injection approach is better?
What is method injection?
What is a circular dependency and how should it be resolved?
What are beans in Spring?
What is the lifecycle of a Spring Bean?
What are custom bean lifecycle methods?
What are some features of custom init and destroy methods?
What information does the bean definition contain?
How can you provide a bean id when using annotations?
Are Spring beans same as JavaBeans?
How are beans created?
What does the @Bean annotation do?
Both @Bean and @Component annotations create beans. What is the difference between the two?
How can dependencies be injected using the @Bean annotation?
What are the different scopes of a bean?
What is the default bean scope in Spring?
What is the default scope in the web context?
When are singleton and prototype scopes used?
How is bean scope defined?
Is Singleton scope in Spring same as the Singleton design pattern?
Are Singleton beans thread safe?
Explain prototype bean scope.
Does Spring manage the complete lifecycle of beans?
What is an inner bean?
What is the purpose of @Component annotation?
What is the difference between @Component, @Service, @Repository, and @Controller?
Why is @Primary annotation used?
Why is @Qualifier annotation used?
Which annotations takes precedence: @Primary or @Qualifier?
Why is the @Required annotation used?
What is the purpose of @Autowired annotation?
Both @Bean and @Component annotations create beans. What is the difference between the two?
What is the difference between @Inject and @Autowired in Spring? Which one to use under which condition?
Spring configuration
What is a configuration file?
How is configuration metadata provided to Spring container/ how are beans configured in Spring container?
What is the difference between XML and Annotation configuration?
How is annotation based configuration enabled in Spring?
Can there be multiple configuration files in a project?
Component scan
What is component scan?
How is component scan done in Spring Boot?
What is the difference between context: annotation-config and context:component-scan tags?
Auto-wiring
What is autowiring in Spring?
What are the different modes of autowiring in Spring?
How does autowiring internally work?
What is autowiring by constructor?
What are the limitations of autowiring?
Is it possible to exclude a bean from being autowired?
What does the @Autowired annotation do?
Miscellaneous questions about Spring
What happens if we specify an interface instead of a class in getBean() method?
Why do we need a no-arg constructor?
What is Spring Security?
What is Spring Boot?
Why do we need Spring Boot?
How can a Spring Boot application be created?
What is Spring Initializr?
What are the components of Spring Boot?
What is the purpose of @SpringBootApplication annotation?
What is the purpose of @RestController annotation in Spring Boot?
What is the purpose of @ConditionalOnMissingBean annotation?
What is an embedded server in Spring Boot?
Can we change the default embedded server to Jetty?
How are Spring Boot web applications deployed?
What is Spring Boot Dependency Management?
What happens when a web application is run using Spring Boot?
How can the default port of the embedded tomcat server be changed?
How can the default web server in a Spring Boot application be disabled?
What are Spring Boot starter projects?
What is spring-boot-starter-parent?
Can Spring Boot be used for applications not built using the Spring framework?
How can we connect Spring Boot with databases?
What does the exclude attribute of the @SpringBootApplication do?
How can external configuration be done in Spring Boot?
What is Spring Actuator?
How can the Actuator be accessed in Spring Boot?
How can you create custom endpoints in Spring Boot Actuator?
Explain Spring Boot DevTools.
Spring Data JDBC
How does Spring provide DAO support?
Describe Spring DAO support classes.
What annotation is used to mark DAO in Spring?
What is Spring Data JDBC?
What tasks are performed by Spring JDBC?
What is the difference between JDBC and Spring JDBC?
Name the classes in Spring JDBC API?
What are the advantages of JdbcTemplate in Spring?
Why is NamedParameterJdbcTemplate class used?
How are records from a database fetched when using JdbcTemplate?
What is the difference between a RowMapper and ResultSetExtractor?
Explain Spring’s exception handling support with DataAccessException.
What is SQLExceptionTranslator?
What are JdbcTemplate callback interfaces?
Spring Data JPA
What is Spring Data?
What is JPA?
What is the difference between JPA and Spring Data JPA?
What is the difference between CrudRepository and JpaRepository?
Which No SQL databases does Spring support?
Which ORMs are supported by Spring?
What is Hibernate?
What are the different types of transaction management supported by Spring?
Which transaction management type is preferred in Spring?
What are some benefits of using Spring Transactions?
What happens when the @Transactional annotation is used on a method?
What is the difference between JdbcTemplate and JPA?