Top 15 Spring Data JPA Interview Questions with Answers
Top 18 Spring Cloud Interview Questions for Java Developers [with Answers]
Difference between JpaREpository, CrudREpository, and PagingAndSortingRepository
Difference between @AutoWired and @Qualifier in Spring Framework?
What is @Conditional annotation in Spring Framework? Example Tutorial
Difference between @Controller vs @RestController in Spring Framework
Spring Framework is a popular open-source application framework that provides infrastructure support for developing Java applications. One of the essential components of Spring Framework is the controller, which is used to handle HTTP requests and provide responses to clients. In Spring, there are two types of controllers: @Controller and @RestController.
How to convert ByteBuffer to String in Java [Example]
How to Convert Byte array to String in Java with Example
2 Ways to Print Custom String Value of Java Enum
How to compare String Objects in Java [Example Tutorial]
How to parse String to Date in Java using JodaTime Example
How to Solve "Error starting Application Context" in Spring Framework?
Hello guys, Spring Boot is a popular framework for building Java applications, providing a streamlined development experience. However, like any software, Spring Boot applications can encounter errors during startup. One common error that developers may encounter is the "Error starting ApplicationContext" error. This error typically indicates an issue with the application's configuration or dependencies but it's really hard to find what exactly is wrong and how to fix it. In the past, I have shared tips on how to fix error creating bean error and In this article, we will explore various solutions to fix this error and ensure a successful startup of your Spring Boot application.
Difference between @RequestParam and @PathVariable in Spring MVC
Top18 Spring Cloud Features for Microservices Architecture in Java
How to create a Microservice in Java using gRPC? Example Tutorial
Hello guys, if you are wondering how to create Microservices in Java then you have come to the right place. Microservices architecture has gained significant popularity due to its scalability, modularity, and ease of deployment. When it comes to building microservices, gRPC (Google Remote Procedure Call) is an excellent choice for facilitating communication between services. In last few articles, I have shared how to build Microservices in Java using Spring Boot and How to build Microservices app using Quarkus and In this article, we will explore how to create a microservice application using gRPC in Java, along with a comprehensive step-by-step tutorial.
How to Create a Microservice using Quarkus in Java? Example Tutorial
What is Service Discovery in Microservices? Client Side vs Server Side Service Discovery?
What is Backend for front-end pattern in Microservices? How to use it? Example Tutorial
How to log messages to File and Console in Java using Log4j? Example Tutorial
Hello guys, if you are wondering how to use a logging library like Log4j or SLF4j in Java then you have come to the right place. In this tutorial, you will learn how to implement logging in your Java program using the Log4j library. Log4j is a Java based open source library from Apache Software Foundation, which is widely used for logging messages in Java applications. In order to use log4j in your application, you first need to download log4j.jar files from https://logging.apache.org/log4j/2.x/download.html site. You can download either the zip version or the tar version depending upon whether you are running your Java program in UNIX or Windows. If you are using Maven then you can also add the following dependency in your pom.xml file and Maven will take care of downloading JAR files.
Differences between OAuth 2.0 and JWT (JSON Web Token)
Hello guys, both OAuth 2.0 and JWT (JSON Web Tokens) are two widely used authentication and authorization protocols in modern web applications. While both serve similar purposes, there are some key differences between the two that are important to understand, which we will see in this article. This is also an important interview question and if you are preparing for Java and Microservices developer interviews, it's better to know how this two technology works and what are the key differences between then. In short, OAuth 2.0 is primarily used for authorization, whereas JWT is primarily used for authentication. OAuth 2.0 uses access tokens, whereas JWT is a self-contained token. OAuth 2.0 has a complex authorization flow, whereas JWT has a simple flow. OAuth 2.0 provides better security as it reduces the risk of unauthorized access to protected resources, while JWT can be intercepted if not properly secured. OAuth 2.0 access tokens are short-lived and need to be refreshed periodically, whereas JWTs do not expire.