Search results for: Java

In this tutorial, you will learn what the @Respository annotation is and how to use it in your Spring Boot applications. @Repository is a Spring annotation that indicates that the decorated class is a repository. A repository is a mechanism for encapsulating storage, retrieval, and search behaviour which emulates a collection of objects. How to…

Read More @Repository Annotation in Spring

This tutorial will guide you through the process of running Unit Tests and Integration Tests separately in a Maven-based Spring Boot application. We will use the JUnit Tag feature to group our test cases and separate Unit Tests from Integration Tests. To learn more, check out the Test Java code tutorials page. Create your tests…

Read More Running Unit Tests and Integration Tests Separately in Spring Boot

If you’re an absolute beginner looking to learn about integration testing for Spring Boot applications with a MySQL database server, then you’re in the right place. As you proceed through this tutorial, remember that everyone was once a beginner, and the only silly question is the one you don’t ask. This tutorial aims to introduce…

Read More Integration Testing with Spring Boot, MySQL and Testcontainers

Mocking a static or private method is often necessary when writing unit tests. However, before Mockito 3.4.0, it was impossible to explicitly mock static methods. Thus, PowerMock offers solutions to the defined use case. In this article, we will look at the introduction of PowerMock and explore examples of mocking private, static, and final methods.…

Read More A Guide to Mocking Private and Static Methods Using PowerMock

Welcome to this comprehensive beginner’s guide on Docker Swarm. I will explain everything in detail, and by the end of this tutorial, you will learn how to use Docker Swarm to orchestrate and scale containers. If you are new to Docker, don’t worry! I will guide you through each step, making sure everything is clear…

Read More Introduction to Docker Swarm: Orchestrating and Scaling Containers

Hello, everyone! In today’s tutorial, I will explain to you the concept of Docker secrets and how they are used to manage sensitive data. As we proceed, you will learn about secrets management and how to use Docker secrets in your applications. To learn more about Docker, checkout the Docker tutorials for beginners page. Introduction…

Read More Docker Secrets: Managing Sensitive Data – A Guide for Beginners

In this tutorial, I will walk you through how to build multi-container applications using Docker Compose. This is a beginner-friendly guide that explains everything you need to know to get started. You will learn how to create a web application with Spring Boot that uses MySQL as a database server. We will also discuss how…

Read More Building Multi-Container Application with Docker Compose: A Beginners’ Guide