Summary of 2-7 Years Interview Experience | Java | Spring Boot | Microservices | SQL | Barclays
Main Ideas and Concepts
-
Deployment Process of Spring Boot Applications
- Write Spring Boot microservices.
- Create a Docker image and push it to AWS Elastic Container Registry (ECR).
- Use AWS CodePipeline to deploy to AWS Elastic Container Service (ECS).
- An EML file is used to automate deployment steps.
-
Exception Handling in Java
- Understand the hierarchy of exceptions (Throwable → Exception → Error).
- Distinguish between checked exceptions (e.g., IOException) and unchecked exceptions (e.g., ArithmeticException).
- Catch blocks should handle the most specific exceptions first to avoid compilation errors.
-
Difference Between
throw
andthrows
throw
is used to explicitly throw an exception, whilethrows
is used in a method signature to declare exceptions that a method can throw.
-
Java 8 Features
- Key features include Lambda expressions, functional interfaces, method references, and the Stream API.
- Parallel streams allow for concurrent data processing but come with challenges like thread safety and debugging difficulties.
-
Stream API Advantages
- Promotes functional programming, reduces boilerplate code, and improves performance with lazy evaluation.
- Supports parallel processing and ensures type safety with generics.
-
Serialization in Java
serialVersionUID
is used to ensure compatibility between serialized and deserialized objects.
-
Synchronized Maps
HashMap
is not synchronized; useConcurrentHashMap
for concurrent access orCollections.synchronizedMap()
for a synchronized version.
-
Static Methods
- Static methods can be overloaded but not overridden because they belong to the class rather than instances.
-
Spring Boot Annotations
@RequestMapping
,@GetMapping
,@PostMapping
for handling HTTP requests.@Primary
and@Qualifier
for bean preference when multiple beans of the same type exist.@ComponentScan
for including beans from different packages.- Actuator for monitoring application health and metrics.
Methodology and Instructions
-
Deployment Steps
- Write microservices.
- Create Docker images and push to ECR.
- Use AWS CodePipeline for deployment to ECS.
- Automate with an EML file.
-
Exception Handling Order
- Catch exceptions in the order from most specific (child class) to least specific (parent class).
-
Using Java 8 to Remove Spaces from a String
- Use
replaceAll
method or stream filtering to remove spaces.
- Use
-
Using
@RequestParam
and@PathVariable
in Spring- Use
@RequestParam
for query parameters and@PathVariable
for path parameters in URLs.
- Use
Speakers or Sources Featured
The video appears to feature a single speaker discussing these technical topics, likely a candidate or interviewer with experience in Java, Spring Boot, and related technologies. Specific names of speakers or sources are not mentioned in the subtitles.
Notable Quotes
— 00:00 — « No notable quotes »
Category
Educational