Java Interview Questions – Part 1

Collections API Which data structure is used when you have lots of add and remote operations? What is time complexity? LinkedList. The insertion, addition and removal operations of an item are faster in a LinkedList because there is no need to resize an array or update the index when an element is added to some arbitrary position […]

Authentication and Authorization Flow in Spring Security

Introduction Spring Security is a framework that provides authentication, authorization, and protection against common attacks. It is the de-facto standard for securing Spring-based applications and supports securing both imperative (servlet) and reactive applications. In this post, we are going to discuss the main actors in the Spring Security architecture that take part in the process […]

Singleton Design Pattern For Interviews

Introduction Singleton is a popular topic that you will encounter at least once during your job search. This short tutorial describes three approaches to implement a singleton class. Singleton Pattern A singleton is simply a class that is instantiated exactly once. We want a single instance of a particular object in the memory. The common […]

If/Else Cumleleri Icin Rule Tasarim Kalibi

Bugun, projemizde kullandigimiz Rule tasarim kalibi (Rule Design Pattern) anlatacagim. Bu yontemi zaman baskisi yuzunden ekibe kabul ettirmek zor oldu ama ortaya cikan sonuctan memnun kaldik. Umarim sizin de isinize yarar. Problem Spring Boot ile yazilan backend uygulamamizda farkli musteri tipleri icin farkli kurallarin uygulandigi bir fonksiyon vardi. Musteri tiplerine gore onyuze farkli bildirim mesajlarini […]

Factory Method Pattern for Spring Hateoas Links

Problem Description You have a single class in your application where you create Hateoas Links for different API versions (e.g.: V1 and V2). The class grows quickly with time as you add a lot of logic for those versions. You want to refactor the existing class so that it is easier to be modified for […]

How to read and override Spring Boot YAML Properties

There are some cases where we need to read and override YAML properties for implementation and testing purposes. This short tutorial will teach you how to do it. You can find the source code on GitHub. Project Structure The project structure is as follows. Reading a YAML Property There are some cases that we read […]

Testing HTTP Methods using Mockito framework

In this post, you will learn how to create HTTP methods in Spring Boot and test them using the Mockito framework. If you are not familiar with unit testing, see my post on Medium. For those who are impatient, you can find the source code on GitHub. HTTP Verbs Overview The most-commonly-used HTTP verbs are […]

AWS Certified Solutions Architect: Notes and Practice Questions

I gathered my study notes and practice questions for the AWS Certified Solutions Architect Associate exam. You can download it at the end of the post. I created the content so that I could review it later on. It might help you along with other resources. However, do not expect a comprehensive document 🙂 Although […]

AWS Certified Solutions Architect – EBS Study Questions

What is Amazon Elastic Block Store (EBS)? Amazon Elastic Block Store (EBS) is an easy to use, high performance block storage service designed for use with Amazon Elastic Compute Cloud (EC2) for both throughput and transaction intensive workloads at any scale What are the features of Amazon EBS? EBS volumes are created in a specific […]

AWS Certified Solutions Architect – EFS Study Questions

General What is mount target? Can you mount an EFS file system in more than one VPC at a time? Can you use EFS file system in multiple VPCs at a time? Can EC2 instances in one VPC can access EFS file systems in another VPC? If yes, how do you do it? Can EFS […]