20 November 2023

#Spring_Framework

#Spring_Framework

Key Concepts


Topic Sub-Topics (comma separated) Basic Intermediate Advanced Expert
Core Container Beans, BeanFactory, ApplicationContext, Bean Scopes, Bean Lifecycle, Dependency Injection (DI), Inversion of Control (IoC)
Configuration XML Configuration, Java-based Configuration, Annotation-based Configuration, Environment Profiles, Externalized Configuration
Spring Context ApplicationContext, MessageSource, Internationalization (i18n), Event Handling, ApplicationListener
Spring AOP AOP Concepts, Join Points, Pointcuts, Advice, Aspects, Proxying, AspectJ Integration
Data Access (DAO) JDBC Template, DataSource, Transaction Management, Exception Translation, ORM Integration
Spring ORM Hibernate Integration, JPA Support, EntityManager, SessionFactory, Transactional Annotations
Spring Transactions Programmatic Transactions, Declarative Transactions, Propagation, Isolation Levels, Rollback Rules
Spring MVC DispatcherServlet, Controllers, HandlerMapping, ViewResolver, ModelAndView, Form Handling, Validation
Spring REST REST Controllers, @RestController, @RequestBody, @ResponseBody, Content Negotiation, Exception Handling
Spring WebFlux Reactive Programming, Mono, Flux, Functional Endpoints, Reactive Repositories
Spring Security Authentication, Authorization, Security Filters, UserDetailsService, Password Encoding, JWT, OAuth2
Spring Boot Auto-Configuration, Starters, Actuator, Spring Boot CLI, Spring Initializr, Properties & YAML
Spring Data Spring Data JPA, Spring Data MongoDB, PagingAndSortingRepository, CrudRepository, Custom Queries
Spring Cloud Config Server, Eureka, Zuul/Gateway, Ribbon, Feign, Hystrix, Sleuth, Cloud Bus
Spring Batch Job, Step, Tasklet, ItemReader, ItemWriter, JobLauncher, Retry & Skip Logic
Spring Integration Messaging, Channels, Transformers, Routers, Adapters, Gateways, Enterprise Integration Patterns
Spring Testing Unit Testing with JUnit, MockMvc, @SpringBootTest, Test Slices, Embedded Database Testing
Spring Messaging JMS, AMQP, STOMP, WebSockets, MessageConverters, RabbitMQ/Kafka Integration
Spring Reactive Reactive Streams, Reactive Data Access, Backpressure, Reactor Core, WebFlux Security
Spring GraphQL Spring for GraphQL, DataFetchers, Schema Mapping, Subscriptions, GraphQL + WebFlux

Interview question

1. Introduction & Basics

  1. What is AOP (Aspect-Oriented Programming)?
  2. What are the advantages of using AOP?
  3. Difference between AOP and OOP.
  4. What are typical use cases of AOP?
  5. How does AOP help in modularizing cross-cutting concerns?
  6. What are cross-cutting concerns?
  7. Difference between core Spring and Spring AOP.
  8. What is the difference between static and dynamic AOP?
  9. What is weaving in AOP?
  10. Difference between compile-time and runtime weaving.

2. Core Concepts

  1. What is an Aspect in Spring AOP?
  2. What is a Join point?
  3. What is Advice in Spring AOP?
  4. What is a Pointcut?
  5. What is Introduction in AOP?
  6. Difference between Aspect, Advice, and Pointcut.
  7. What is a Target object?
  8. How is a Proxy related to Spring AOP?
  9. What are the types of Join points in Spring?
  10. What is AspectJ and its relation to Spring AOP?

3. Types of Advice

  1. What is Before Advice?
  2. What is After Advice?
  3. What is AfterReturning Advice?
  4. What is AfterThrowing Advice?
  5. What is Around Advice?
  6. Difference between Before and Around Advice.
  7. How to implement custom logic in Around Advice?
  8. How to access method arguments in Advice?
  9. How to modify return value in AfterReturning Advice?
  10. How to handle exceptions in AfterThrowing Advice?

4. Pointcut Expressions

  1. What is a Pointcut Expression?
  2. How to use execution() in pointcut expressions?
  3. How to use within() in pointcut expressions?
  4. How to use args() in pointcut expressions?
  5. How to use @annotation() in pointcut expressions?
  6. How to use bean() in pointcut expressions?
  7. Difference between execution() and within().
  8. How to combine multiple pointcut expressions?
  9. How to create reusable pointcut expressions?
  10. How to test pointcut expressions?

5. Aspect Implementation

  1. What is @Aspect annotation used for?
  2. How to use @Before annotation?
  3. How to use @After annotation?
  4. How to use @Around annotation?
  5. How to use @AfterReturning annotation?
  6. How to use @AfterThrowing annotation?
  7. How to inject dependencies into an Aspect?
  8. How to order aspects using @Order?
  9. Difference between XML-based and annotation-based aspects.
  10. How to define multiple advices in a single aspect?

6. Weaving

  1. What is weaving in AOP?
  2. Difference between compile-time, load-time, and runtime weaving.
  3. How does Spring implement runtime weaving?
  4. How to enable load-time weaving in Spring?
  5. What are AspectJ weaver and proxy-based weaving?
  6. How to debug issues in weaving?
  7. Difference between proxy-based AOP and AspectJ AOP.
  8. How does Spring choose JDK Dynamic Proxy vs CGLIB?
  9. How to force CGLIB proxy in Spring?
  10. How does AOP proxy affect class hierarchy?

7. Spring AOP Proxy

  1. What is a proxy in Spring AOP?
  2. Difference between JDK Dynamic Proxy and CGLIB Proxy.
  3. How does Spring decide which proxy to use?
  4. How to access the underlying target object?
  5. How does proxy affect equals() and hashCode()?
  6. How to apply multiple advices on a single proxy?
  7. How to test proxy objects?
  8. How to handle self-invocation in proxies?
  9. Difference between interface-based and class-based proxy.
  10. How to use ProxyFactoryBean?

8. Order & Precedence

  1. How to order multiple aspects using @Order annotation?
  2. How does Spring determine execution order of advices?
  3. Difference between global and local aspect order.
  4. How to set priority for specific advices?
  5. How to debug advice execution order?
  6. How to apply conditional advice execution?
  7. How to combine multiple pointcuts with order?
  8. How to prevent circular advice calls?
  9. How to test order in unit tests?
  10. How to document execution order of aspects?

9. Exception Handling

  1. How to handle exceptions in AOP advice?
  2. How to propagate exceptions from Advice?
  3. How to implement retry logic in Around Advice?
  4. How to implement fallback methods in Advice?
  5. How to log exceptions centrally using AOP?
  6. How to combine exception handling and transaction management?
  7. How to prevent exception swallowing in advices?
  8. How to implement custom exception hierarchies in AOP?
  9. How to test exception handling in aspects?
  10. How to use @AfterThrowing to notify external systems?

10. Integration & Advanced Topics

  1. How to integrate Spring AOP with Spring Boot?
  2. How to use AOP for logging method execution time?
  3. How to implement security using AOP?
  4. How to implement caching using AOP?
  5. How to profile applications using AOP?
  6. How to use AOP with transactions?
  7. How to implement custom annotations for aspects?
  8. How to test AOP in integration tests?
  9. What are best practices for writing aspects?
  10. Common pitfalls when using Spring AOP.


Related Topics


   Spring_Boot   
   Spring_Framework   
   Spring_Cloud   
   Spring_Rest   
   Spring_AOP   
   Spring_Batch   
   Spring_MVC   
   Spring_Security   
   Spring_JPA   
   Spring_AI