0% found this document useful (0 votes)
187 views

Microservice Interview FAQs

The document discusses various Java, Spring, SQL, and project-related topics including streams, exceptions, design patterns, REST APIs, properties, JPA, indexes, cursors, microservice architecture, inter-service communication, and security.

Uploaded by

test.test
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views

Microservice Interview FAQs

The document discusses various Java, Spring, SQL, and project-related topics including streams, exceptions, design patterns, REST APIs, properties, JPA, indexes, cursors, microservice architecture, inter-service communication, and security.

Uploaded by

test.test
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Java

1) Different ways to sum list of integers using Streams


2) How to identify and handle null pointer exception in java 8. (My answer was using Optional
class)
3) Explain immutable class and write a sample code. Similarly, Example code for singleton
(Bala added a scenario like what happens if there is a date object in our custom immutable
class, how to copy the value of date object to our custom immutable class)
4) Features of Java 8
5) Explain try with resources.
6) What is reduce function in Java Streams. Give an example.
7) What are parallel streams? What are its advantages and disadvantages.
8) Explain where you have used method override concept? Can we change the access modifiers
when overriding a method. (Example From Default to public or Public to private etc)
9) String comparison (with == and equals() method and using new keyword)
10) What is peek () function in Java 8 streams?
11) Can a Optional hold null values? ( Answer is yes, only if create by using optional.ofNullble()
method but the resulting value will be empty optional object)

Spring/Spring Boot

1) What is actuator and why it is used?


2) How exceptions will be handled in Spring boot applications (He is expecting about global
exception handling using @ControllerAdvice)
3) Explain some Design Patterns of Micro service architecture.
4) Explain the communication between microservices (Sync and Async Communication)
5) Write a sample code to demonstrate a Rest API GET end point.
6) Were do you store your DB credential in your application.
7) How you’ll read the properties values in your application. (How to read values from
application. Properties file from our Java code. Here we can use @Value annotation
approach and we have another class in spring to read values from properties file. We can
explain both)
Example :
/** The reporting service url. */
private static String reportingServiceUrl;

/**
* Sets the reporting service url.
*
* @param reportUrl the new reporting service url
*/
@Value("${reporting-service.url}")
public void setReportingServiceUrl(String reportUrl) {
reportingServiceUrl = reportUrl;
}

8) Any prior experience with Application cloud migration (Cloud deployment)


9) What do you know about proxy interfaces and classes (Related to Spring security)
10) What do you know about Retry mechanism in microservices?
https://www.baeldung.com/spring-retry
11) What is Spring AOP?
12) What is YAML Contract. How you write a YAML contract for API documentation.

JPA/Hibernate

1) What is Spring Data JPA and how will you create a Spring Boot application that
communicates with Data base . (We need to explain the step/ hierarchy of application)
2) How you’ll do relational mapping. Give and example for Many to One ( What
annotations we need to use and how we will map with example)

SQL

1) What are indexes and their advantages?


2) What is curser? Have you ever worked on them.

Project Related

1) How many Microservices in your previous project


2) Explain basic structure of your previous project.
3) How you have implemented inter service communication (Same as Micro service
communication)
4) How you’ve implemented security in your application
5) Have you ever worked on a production related bug fix. How did you analyse it.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy