Spring Boot Interview Questions (Basic To Intermediate)
Spring Boot Interview Questions (Basic To Intermediate)
Intermediate)
• What is Spring Boot? Spring Boot is a Java-based framework for creating stand-alone, production-
grade Spring applications with minimal configuration. It builds on the Spring framework and follows
an opinionated approach to eliminate boilerplate setup (e.g. embedded servers, auto-configuration)
1 2 . Spring Boot applications “just run” with embedded web servers (like Tomcat), making it easy
• What are the key features of Spring Boot? Its main features include auto-configuration (detects
libraries on the classpath and configures beans automatically), Spring Boot Starters (pre-defined
dependency descriptors for common functionality), embedded servers (Tomcat/Jetty out of the
box), and production-ready tools like Actuator for health checks and metrics 3 4 . These
features reduce boilerplate and speed up development, enabling “rapid development” of Spring
applications 3 .
• Why use Spring Boot over the core Spring Framework? Spring Boot simplifies Spring-based
development by handling setup and configuration automatically. Unlike plain Spring (which requires
manual XML or Java config), Spring Boot “auto-configures itself based on the dependencies” in your
project and includes an embedded server, making apps easier to package and run 5 3 . In
essence, Spring Boot is an opinionated subset of Spring that favors convention over configuration
for faster startup and more production-ready defaults.
• How do Spring Boot starters work? Starter dependencies are curated Maven/Gradle POMs that
bundle common libraries together. For example, the spring-boot-starter-web starter includes
Spring MVC, an embedded Tomcat, and Jackson JSON by default 7 . Spring Boot starters let you add
a single dependency (like spring-boot-starter-data-jpa ) to pull in everything needed for JPA/
Hibernate support 7 . This simplifies dependency management and ensures compatible versions
across modules.
• What is Spring Initializr? Spring Initializr (start.spring.io) is a web/tool that generates a skeleton
Spring Boot project. You choose your build tool, Java version, and dependencies (starters), and it
produces a ready-to-code project with a preconfigured pom.xml or build.gradle . In effect,
Initializr does the “project structure from scratch” and bootstrap code generation 8 . This helps
jump-start applications without manual setup.
1
• Explain how a Spring Boot application starts. When you run the main() method (usually in a
class annotated @SpringBootApplication ), Spring Boot creates a SpringApplication
instance and calls run() . This does several things: it sets up a Spring ApplicationContext ,
triggers auto-configuration based on the classpath, and starts the embedded server (Tomcat/Jetty) if
it’s a web app 9 10 . For example:
@SpringBootApplication
public class MyApp {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}
This single run() call initializes the entire Spring Boot application context and web server 9 .
• How is dependency management handled in Spring Boot? Spring Boot maintains a curated set of
library versions. By including Spring Boot parent POM or plugin, it automatically manages versions
of common dependencies so you don’t have to specify them explicitly. When you add a starter (e.g.
spring-boot-starter-web ), Spring Boot includes compatible versions of required libraries.
Under the hood it uses Maven/Gradle dependency management to ensure compatibility 11 . This
prevents version conflicts and reduces manual dependency configuration.
• What are application.properties (or application.yml ) files used for? Spring Boot uses
application.properties or application.yml as a central configuration file. You set
properties like server port, database URL, JPA settings, etc. Spring Boot loads these on startup to
configure the environment. For example, you can set:
server.port=8081
spring.datasource.url=jdbc:mysql://localhost:3306/mydb
spring.jpa.hibernate.ddl-auto=update
These would change the default server port and configure the DataSource automatically 12 13 .
YAML is an alternate format that supports hierarchical structure, but both are equivalent in function.
• How do you change the embedded server port? By default Spring Boot’s embedded Tomcat listens
on port 8080. You can override this in application.properties with
server.port=YOUR_PORT . For example, server.port=8081 would switch to port 8081 14 .
Setting server.port=-1 even disables the embedded server entirely (for non-web apps) 15 .
2
@SpringBootApplication
@EnableAutoConfiguration(exclude=DataSourceAutoConfiguration.class)
public class App { … }
This would stop Spring Boot from auto-configuring a DataSource if you need custom behavior 16 .
• Can you create non-web Spring Boot applications? Yes. Spring Boot is not limited to web apps.
You can build console apps, batch jobs, microservices, and more. If you omit the web starter
dependencies, Spring Boot will not start an embedded server. For example, including
spring-boot-starter-batch or simply using @SpringBootApplication without spring-
boot-starter-web creates a non-web (e.g. console) app 17 .
• Explain how Spring Boot handles a REST API call. In a typical Spring Boot REST app: a client makes
an HTTP request (GET/POST/PUT/DELETE) to the server, which is received by the embedded Tomcat.
The request is dispatched to a controller (classes annotated with @RestController or
@Controller ) via Spring MVC mapping annotations. The controller calls service-layer business
logic, which may use repositories (Spring Data JPA) to access the database. Finally, a response (often
JSON) is returned to the client. The flow is: Client → Dispatcher Servlet → Controller → Service →
Repository → DB → back out to client 18 19 . Spring handles object mapping to JSON
automatically if you use @RestController .
@RestController
public class UserController {
@GetMapping("/users/{id}")
public User getUser(@PathVariable long id) { … }
}
Here, the User object returned is automatically written as JSON to the HTTP response.
3
@RequestMapping(method = RequestMethod.GET) and only handles GET requests. For
example:
@RequestMapping(value="/items", method=RequestMethod.GET)
public List<Item> listItems() { … }
@GetMapping("/items")
public List<Item> listItems() { … }
Both do the same thing. Use the specific @GetMapping , @PostMapping , etc. to make intent clear
21 .
• How do you inject configuration properties? Spring Boot externalizes configuration using
properties or YAML. You can inject values into beans using @Value("${property.name}") , or
bind groups of properties to a class with @ConfigurationProperties . For example:
@Component
@ConfigurationProperties(prefix="app")
public class AppProperties {
private String name;
// getters/setters
}
app.name=MyApp
the name field is populated. This is useful for type-safe, structured config. Profiles allow different
config for different environments (e.g. application-dev.properties vs application-
prod.properties ) 22 .
• How do you validate input and handle exceptions? Spring Boot supports JSR-303 bean validation.
You can annotate request DTO fields with constraints (e.g. @NotNull , @Size ) and put @Valid
on the @RequestBody parameter in a controller. If validation fails, Spring automatically returns a
400 Bad Request. For example:
4
For exception handling, you can use @ExceptionHandler in controllers or a global
@ControllerAdvice class. An example: annotate a class with @ControllerAdvice and write methods
with @ExceptionHandler(SomeException.class) to handle exceptions globally. Spring will call these
handlers and you can return a custom error response 24 .
• What is Spring Boot Actuator and why use it? Spring Boot Actuator adds production-ready
endpoints for monitoring and management. It exposes built-in endpoints (over HTTP or JMX) like /
actuator/health (application health), /actuator/metrics (memory, CPU, etc.), /actuator/
env (current environment properties), and more 25 26 . These endpoints help you observe the
running application: health checks, metrics, environment config, logging levels, etc. For instance, /
health shows if the app and its DB are up, and /metrics shows JVM stats 27 . To use Actuator
you simply add the spring-boot-starter-actuator dependency. Actuator is crucial for
monitoring Spring Boot apps in production 28 .
• How do you enable Actuator endpoints? After adding Actuator as a dependency, you may need to
configure which endpoints are exposed. By default many endpoints (like /health , /info ) are
enabled but often require you to activate them via application.properties . For example:
management.endpoints.web.exposure.include=health,info,metrics,env,loggers
management.endpoint.health.show-details=always
Then you can access http://localhost:8080/actuator/health , etc. You can also secure
these endpoints if needed. (At runtime you can even change log levels via /actuator/loggers ).
spring.datasource.url=jdbc:mysql://localhost:3306/yourdbname
spring.datasource.username=yourusername
spring.datasource.password=yourpassword
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
On startup, Spring Boot uses these to create a connection pool and JPA EntityManagerFactory
13 . No XML config is needed. Spring Boot also supports embedded H2 (in-memory) if no external
DB is configured, making dev/test easy.
• How does Spring Boot support database migrations (Flyway/Liquibase)? Spring Boot has first-
class integration with Flyway and Liquibase. If you add the Flyway (or Liquibase) starter dependency,
Spring Boot auto-detects it and runs migrations on startup. For example, include:
5
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
• What are Spring Profiles? Spring Profiles allow grouping configuration under different environment
names (e.g. dev , test , prod ). You annotate beans or use profile-specific properties files (like
application-dev.properties ). Then activate a profile via spring.profiles.active=dev .
This way the app can automatically pick the correct beans/config for the environment 30 . Profiles
are often used to load different DB settings or logging for development vs production.
• How would you design and deploy Spring Boot microservices? Common steps include:
• Decompose services by business capability, each running on its own Spring Boot app (with its own
database).
• Communication: use RESTful APIs or messaging (RabbitMQ/Kafka) between services.
• Configuration: use Spring Cloud Config for central config management. For example:
spring:
cloud:
config:
uri: http://config-server:8888
6
This lets all services fetch their properties from one place 32 .
• Service Discovery: use Eureka (or Consul) so services can find each other. Annotate each app with
@EnableEurekaClient and configure Eureka’s URI 33 .
• Load Balancing: use Ribbon or Spring Cloud LoadBalancer to distribute requests (e.g.
@LoadBalanced RestTemplate) 35 .
• Containerization: build Docker images for each service (see example Dockerfile in [21], e.g. FROM
openjdk:11-jre-slim … ) and use Kubernetes or Docker Compose for orchestration 34 .
• Observability: include Actuator and external monitoring (Prometheus/Grafana) in each service.
• What is Spring Cloud and how is it related to Spring Boot? Spring Cloud is a suite of projects for
building distributed, cloud-native applications. It complements Spring Boot by adding tools for
common patterns in distributed systems: service discovery (Eureka), config server (Spring Cloud
Config), circuit breakers (Resilience4j/Hystrix), distributed tracing (Sleuth/Zipkin), etc. In essence,
Spring Boot gives you the microservice framework, and Spring Cloud gives you the glue for running
in cloud environments 32 . (In interviews, you might mention how Spring Cloud integrates easily
with Spring Boot apps to solve cloud challenges.)
• How do you monitor a Spring Boot application? Aside from Actuator endpoints (health, metrics,
etc.), Spring Boot supports micrometer metrics. You can integrate monitoring tools (Prometheus,
Grafana) by exporting metrics endpoints. The embedded Actuator endpoints (via HTTP or JMX) give
real-time data (memory, garbage collection, request counts). For example, /actuator/metrics/
jvm.memory.used shows JVM memory usage. Additionally, you can use external APM tools (New
Relic, Zipkin) by including their libraries. In short, Spring Boot has built-in observability via Actuator
and can be plugged into enterprise monitoring solutions.
• How is exception handling done in Spring Boot? Typically you use @ExceptionHandler
methods in controllers or a global @ControllerAdvice class. For example:
@ControllerAdvice
public class GlobalErrorHandler {
@ExceptionHandler(EntityNotFoundException.class)
public ResponseEntity<String> handleNotFound(EntityNotFoundException
ex) {
return ResponseEntity.status(404).body(ex.getMessage());
}
}
This way, any controller throwing EntityNotFoundException returns a 404 with a message.
@ControllerAdvice “integrates multiple exception handlers into a single global unit” 24 , making
it easy to centralize error handling. Spring Boot also maps validation errors (from @Valid ) to 400
responses automatically.
7
• What are common HTTP error/exception handling approaches? You can also use
ResponseEntityExceptionHandler by extending it, or define error attributes/views. The
simplest pattern is to have DTOs with @Valid , catch MethodArgumentNotValidException for
validation errors, and return structured error JSON. Spring Boot’s default error page can be
customized by providing an error.html or customizing /error endpoint via
ErrorController if you need a specific error response format.
• How do you externalize configuration (e.g. for prod vs dev)? Use Spring Profiles and external
property files. For example, have application-dev.properties and application-
prod.properties on the classpath. When launching, set -Dspring.profiles.active=prod
(or in application.properties ). Spring Boot will load the profile-specific file on top of the
defaults. You can also use environment variables (e.g. SPRING_DATASOURCE_URL ) or command-
line args to override any property at runtime. This ensures the same code can run with different
configs in different environments.
• How do you build and deploy a Spring Boot app? By default, Spring Boot packages as a runnable
jar with embedded server ( spring-boot-maven-plugin ). Running mvn clean package
produces a fat JAR ( java -jar app.jar ). You can also make a WAR (suitable for an external
Tomcat) by changing packaging. Deployment can be as simple as copying the JAR to a server and
running it. For Docker, you use a Dockerfile with OpenJDK and copy the JAR (see the example
above). For Kubernetes, you use the Docker image. Many cloud platforms have easy deployment for
Spring Boot (AWS Elastic Beanstalk, Google App Engine, etc.) because it is self-contained.
• What is an Entity in JPA/Hibernate? An Entity is a Java class annotated with @Entity that
represents a database table. Each entity class corresponds to a table, and each instance corresponds
to a row. An entity usually has a field annotated with @Id to denote the primary key. For example:
@Entity
public class User {
@Id @GeneratedValue
private Long id;
8
private String name;
// getters/setters
}
• How do you configure Hibernate (XML vs annotations)? Hibernate can be configured via an
hibernate.cfg.xml file (listing properties and mapping files) or purely through annotations and
persistence.xml . In Spring Boot, you typically skip hibernate.cfg.xml – you just set
properties (datasource URL, dialect, etc.) in application.properties and annotate entities with
@Entity , @Table , etc. Hibernate will scan for entities on the classpath. Both methods achieve
the same result. (Explicit XML is older style; annotated classes and Spring Boot’s auto-configuration
are more common now.)
• What is the role of Session in Hibernate? A Session in Hibernate represents a unit of work and
holds a first-level cache. It manages the persistence of entities. When you retrieve an object (e.g.
session.get(User.class, 1L) ), Hibernate stores it in the session’s cache. If you request it
again within the same session, it won’t hit the DB again. The session tracks changes to entities: on
commit() , it flushes those changes to the database. Essentially, the session is your main interface
for CRUD in Hibernate.
• Transient: a newly new instance not associated with any session. It’s not saved or tracked yet.
• Persistent: an object that is associated with a Hibernate session (e.g. after session.save(obj) ). It
is cached in the session and will be synchronized with the database on commit.
• Detached: an object that was persistent but its session has been closed or it has been evicted. It’s no
longer tracked by a session. To save a detached object, you must merge it into a new session.
9
Understanding these is crucial for correct persistence behavior (e.g. detached entities need
session.merge() ).
Use get() when you need to check existence; load() for lazily fetching only if needed.
• What is HQL and how is it different from SQL? HQL (Hibernate Query Language) is an object-
oriented query language similar to SQL but operates on entity classes and their fields. For example,
from User where name = :name . Hibernate translates HQL into SQL for the specific database.
Unlike SQL, HQL is database-independent (you write queries in terms of entities, not tables) 40 . JPA
also defines JPQL (Java Persistence Query Language) with the same idea.
• What is Criteria API? The Criteria API provides a programmatic way to build queries in Hibernate
(and JPA) without writing HQL strings. It is typesafe and dynamic. For example:
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<User> cq = cb.createQuery(User.class);
Root<User> root = cq.from(User.class);
cq.select(root).where(cb.equal(root.get("name"), "Alice"));
List<User> users = em.createQuery(cq).getResultList();
This constructs an equivalent of SELECT * FROM User WHERE name='Alice' in a typesafe way
41 .
• What is the default fetch strategy (lazy vs eager) for associations? By default, many-to-one and
one-to-one associations are EAGER in JPA/Hibernate, and one-to-many/many-to-many are LAZY.
However, Hibernate’s @ManyToOne defaults to eager, and @OneToOne defaults to eager, whereas
collections ( @OneToMany , @ManyToMany ) default to lazy. You can override with
fetch=FetchType.LAZY or EAGER . For example:
@OneToMany(fetch=FetchType.LAZY)
private List<Order> orders;
forces lazy loading. Using FetchType.LAZY means associated data is fetched only when accessed,
which can reduce initial load 42 . (Note: overusing eager fetching can lead to performance issues;
lazy loading may cause extra queries if not managed.)
• What is first-level cache (session cache)? Every Hibernate Session has a built-in first-level cache.
When you retrieve an entity within a session, Hibernate stores it in the session cache (a simple
10
HashMap of ID→object) 43 . If you query the same entity again in that session, Hibernate returns
the cached instance instead of querying the database again. This ensures within one transaction or
session, each object is loaded only once, improving performance. The first-level cache is not
configurable and is always active during a session 44 .
• What is second-level cache? The second-level cache is a configurable shared cache for entity data
that spans multiple sessions. If enabled (e.g. with Ehcache or Hazelcast), Hibernate will store
frequently accessed entities at the SessionFactory level. Subsequent sessions can read from this
cache instead of the database. For example, enabling second-level cache for an entity means after
one session loads it, later sessions can fetch it from cache. This can dramatically reduce DB load. (It’s
disabled by default; you enable it via properties like
spring.jpa.properties.hibernate.cache.use_second_level_cache=true and
configuration of a cache provider.)
• What is lazy loading vs eager loading? Lazy loading means an associated entity or collection is
loaded only when accessed (deferred). Eager loading means it’s loaded immediately with the parent
entity. For example, if User has a lazy @OneToMany roles , loading the user won’t immediately
load roles – they load on demand. An EAGER fetch would load roles in the same query or join. Lazy
loading “creates extra database calls if accessed” 45 , while eager might retrieve everything in one
go (but can fetch unnecessary data).
• Explain the N+1 select problem in Hibernate. The N+1 problem occurs when loading a list of
entities (1 query) and then lazily accessing a child collection or association for each (N additional
queries). For example, fetching 10 users and then iterating each user’s orders with lazy fetch can
cause 1 query for users + 10 queries for orders = 11 queries. This hurts performance. Solutions
include using JOIN FETCH in HQL/JPQL to load associations together, or configuring batch
fetching.
• What are transactions and how does Spring/Hibernate manage them? Transactions ensure a set
of DB operations succeed or fail as one unit (ACID). In Spring, we usually annotate methods with
@Transactional . Spring Boot auto-configures transaction management if JPA is on the classpath
38 . This means before your method runs, Spring opens a transaction, and on successful completion
it commits, or rolls back on an exception 38 46 . Under the hood, Spring uses either Hibernate’s
@Service
public class OrderService {
@Transactional
public void placeOrder(...) {
// this entire method runs in one transaction
}
}
By default, runtime exceptions trigger rollback. You can also specify isolation and propagation if
needed.
11
• What are optimistic and pessimistic locking? These are strategies for handling concurrent data
access in Hibernate:
• Optimistic locking assumes conflicts are rare. Each entity has a version field ( @Version ). On update,
Hibernate checks if the version has changed. If another transaction modified it, an
OptimisticLockException is thrown 47 . It allows high concurrency since reads do not lock. It is
good for low-contention scenarios.
• Pessimistic locking locks the database rows when reading/updating (using SQL SELECT ... FOR
UPDATE ). Hibernate supports this via LockMode.PESSIMISTIC_WRITE / READ . When one
transaction locks a row, other transactions trying to lock it will wait (or fail), preventing conflicts 48 .
This is used when you expect high contention and want to prevent concurrent updates. It can hurt
scalability (locks can block or deadlock) 48 .
• What is Spring Data JPA? Spring Data JPA is Spring’s library that builds on JPA/Hibernate to simplify
data access. It provides repository interfaces (like JpaRepository ) so you can write a DAO without
implementation. For example, interface UserRepo extends JpaRepository<User, Long>
{} automatically gives CRUD methods. Spring Boot’s spring-boot-starter-data-jpa includes
Hibernate by default, auto-configuring an EntityManagerFactory and transaction manager.
Thus Spring Data JPA integrates Hibernate with Spring and eliminates most boilerplate 7 .
• save() (in Spring Data JPA) or persist() (JPA) makes an entity managed/persistent but does
not necessarily hit the DB immediately. It will be flushed on commit.
• saveAndFlush() forces an immediate flush to the database after saving. This is useful if you need
the data written before further operations.
• merge() copies the state of a detached entity into the current persistence context (if the entity is
detached or new). It returns a managed instance. Unlike persist() , merge() can update
existing records.
For example, save() is fine for most cases, but if you need the ID or DB state right away, use
saveAndFlush() 49 .
• What is a JPA repository and how do derived queries work? In Spring Data JPA, a repository
interface (like JpaRepository ) provides generic CRUD methods. You can also define query
methods by naming convention. For example: List<User> findByEmail(String email);
Spring Data automatically creates the necessary query. It parses method names into JPQL. You can
also use @Query for custom JPQL or native SQL. The convenience is that you don’t have to write
DAO implementations – the framework handles it.
• How do you implement paging and sorting? Spring Data JPA supports paging via the Pageable
interface. You can define a repository method like Page<User> findAll(Pageable
pageable); . You create a PageRequest (with page number and size, and optionally sort criteria)
and pass it. Spring Data executes the appropriate LIMIT query. Sorting can be done with
PageRequest.of(page, size, Sort.by("name")) . This is a very common interview topic in
Spring Data JPA.
12
• How do you map relationships? Use JPA annotations:
@OneToMany(mappedBy="user")
private List<Order> orders;
• What is the N+1 select problem and how to fix it? (Repeat of above lazy mention) N+1 arises when
fetching a parent list triggers additional queries for each child. You can fix it by using fetch joins in
JPQL/HQL, e.g. SELECT u FROM User u JOIN FETCH u.orders to fetch users and orders
together. Also consider batch fetching or second-level caching.
• How do you cache queries in Hibernate? You can enable a query cache along with second-level
cache. In practice, annotate queries with @Cacheable or configure
hibernate.cache.use_query_cache=true . Once second-level caching is on, repeated identical
queries can return cached results. Often interviewers focus more on first-level and second-level
cache usage (see above) than query cache.
• What is cascading in Hibernate/JPA? Cascade specifies that operations on a parent entity should
propagate to its children. For example, @OneToMany(cascade=CascadeType.ALL) on a parent’s
collection means that if you save or delete the parent, the same action is applied to all child entities.
13
It’s useful to manage related data without extra code. Common cascade types: PERSIST , MERGE ,
REMOVE , REFRESH , ALL .
• How do you handle concurrency in Hibernate? Optimistic/pessimistic locking (as above) are
primary methods. You can use the @Version annotation for optimistic locking. For pessimistic, use
entityManager.lock(entity, LockModeType.PESSIMISTIC_WRITE) or Query hints.
Additionally, setting appropriate transaction isolation levels at the DB or JPA level can help (e.g.
@Transactional(isolation=Isolation.SERIALIZABLE) ).
• How do you integrate Hibernate with Spring Boot (Spring Data JPA)? In Spring Boot, Hibernate is
usually accessed via Spring Data JPA. You configure spring.datasource.* properties and add
spring-boot-starter-data-jpa . Spring Boot auto-configures an EntityManagerFactory
(Hibernate-based) and a PlatformTransactionManager . You annotate your repositories with
@Repository (or extend JpaRepository ) and Hibernate does the rest. Spring Data abstracts
away the boilerplate of Hibernate’s Session and Transaction management.
• Coding Example (Spring Boot + Hibernate): For instance, you might define an entity and repository
as follows:
@Entity
public class Product {
@Id @GeneratedValue
private Long id;
private String name;
// ...
}
@Service
public class ProductService {
@Autowired ProductRepository repo;
@Transactional
public Product createProduct(Product p) {
return repo.save(p);
}
}
Spring Boot will create the tables (if ddl-auto is set to create/update ) and provide CRUD
methods with repo.save() . You don’t see any Hibernate code explicitly, but under the hood
Hibernate is persisting entities.
14
• Latest Trends: Recent Spring Boot versions (3.x) require Jakarta EE namespaces (e.g.
jakarta.persistence ). Spring Boot 3 also offers GraalVM native image support and better
alignment with Spring Framework 6. Interviewers may ask about migrating to Spring Boot 3 or using
Kotlin with Spring Boot. For Hibernate, version 6 has some API changes; familiarity with recent
Hibernate/JPA versions can be a plus. Emphasize hands-on knowledge (e.g. “I’ve used Spring Boot 2.x
in production and have looked into Spring Boot 3 migration, using new java.time converters and
Spring Data JPA features.”).
Sources: Authoritative Spring Boot and Hibernate tutorials and interview guides 1 20 38 43 were used
to compile these questions and explanations. These references reflect the latest (2025) interview topics and
sample answers for Spring Boot and Hibernate roles.
36 43 44 Hibernate - Enable and Implement First and Second Level Cache - GeeksforGeeks
https://www.geeksforgeeks.org/java/hibernate-enable-and-implement-first-and-second-level-cache/
37 42 49 Top 30 Most Common spring data jpa interview questions You Should Prepare For
https://www.vervecopilot.com/interview-questions/top-30-most-common-spring-data-jpa-interview-questions-you-should-
prepare-for
15