Frameworks

Spring Boot

Basics

  • What is Spring Boot

Internals

  • What is @SpringBootApplication.

  • Types of dependency injection, how does it work?

  • What is the difference between @Autowired and constructor injection in Spring?

  • How does spring boot auto configuration work bts?

Annotations

  • What is difference between @Component and @Bean?

  • Explain the purpose of the @Scope annotation in Spring?

  • What is the role of @RestController in Spring, and how is it different from @Controller?

    • Can I use @Component in its place?

  • How does Spring handle lifecycle events using @PostConstruct and @PreDestroy annotations?

Testing

  • @SpringBootTest's purpose?

  • What is @DirtiesContext annotation do?

Hibernate

Basics

  • What is the difference between EntityManager and Session in JPA and Hibernate?

  • What is dirty checking?

  • Explain an entities life cycle in persistence context.

  • How many Cache levels in hibernate and their scope or purpose.

  • Can we disable level 1 cache?

Associations

Spring Data JPA

  • What is JPA, how is it related to hibernate?

  • Explain associations in Hibernate / JPA.

  • Types of Fetch in Hibernation when entities are associated

  • N + 1 select problem what is it? how to solve it?

  • @Transactional purpose and working bts?

  • Types of isolation level and propogation level.

  • Entity Graph and its purpose, how is it dynamic?

Junit

  • Mock vs Spy?

  • @ExtendWith annotation purpose?

  • @Mock vs @MockBean annotation?

  • @InjectMock annotation purpose.

  • How to test a private method

Last updated