Prerequisite: How to Create a Spring Bean in 3 Different Ways?...
ResourceBundleViewResolver in Spring MVC is used to resolve “view named” by view beans in the “.properties” file. View beans defined in the properties file are utilized by the ResourceBundleViewResolver to determine the view names. Using the Spring Web MVC Framework, the ResourceBundleViewResolver may be utilized as demonstrated in the following example....
The Spring WebFlux is part of Spring Framework and this allows developers to develop non-blocking applications. It provides different operators to handle the publisher and consumers in the application by using Spring reactor. In this article, we explain what is pagination and its uses in web software applications with related examples with output images for understanding the concept in a better way....
Spring WebFlux is part of Spring Framework, allowing us to Reactive programming and Support non-blocking I/O operations. The Spring Framework provides a lot of Annotations to handle the applications. This article focuses on Global Exception Handling by using Rest API in the Spring WebFlux. For this, we have one Spring Annotation that is @ControllerAdvice This annotation catches the exceptions from the entire module. Also, we can change the type of HTTP status code while dealing with the server by using this @ControllerAdvice annotation....
In Spring Boot, Spring Security is the most powerful and customizable authentication and access control framework for Java applications, and it provides strong security features to protect web applications from various security threats such as authentication, authorization, session management, and web vulnerabilities. It is highly flexible and easy to implement with Spring applications....
Dependency Injection (DI) is essential for improving code modularity, maintainability, and testability in the context of sophisticated Java programming. Choosing between private and private-final injection for dependencies is a typical DI concern. We will examine the distinctions between these two strategies in this post, as well as their applications and ramifications....
Enums are a special data type in Java used for representing a fixed set of constants. Controller methods can take enums as parameters, Spring MVC will automatically translate the value of the incoming request parameter to the appropriate enum constant....
UUIDs (Universally Unique Identifiers) are commonly used as primary keys in databases. Because they provide a unique identifier across different systems without relying on a centralized authority. In a Spring Boot application, you can use UUIDs as primary keys for your entities....
The Spring Web model-view-controller (MVC) is an open-source framework used to build J2EE web applications. It is based on the Model-View-Controller design pattern and implements the basic features of a core spring framework – Dependency Injection. It is designed around a ‘DispatcherServlet’ that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, and theme resolution as well as support for uploading files. In the MVC framework, M stands for Model – used to work with the data, V stands for View – used to work with presenting data to user and C stands for Controller – that contains actual business logic to process the user input....
In a Spring Boot project, we have to test the web layer. For that, we can use MockMVC. In this tutorial, let us see how to do that by having a sample GeekEmployee bean and writing the business logic as well as the test cases for it....
AOP(Aspect Oriented Programming) breaks the full program into different smaller units. In numerous situations, we need to log, and audit the details as well as need to pay importance to declarative transactions, security, caching, etc., Let us see the key terminologies of AOP...
Spring is an open-source lightweight framework that allows Java EE developers to build simple, reliable, and scalable enterprise applications. This framework is designed on the concept of Dependency Injection that focuses on providing various ways to manage business objects....