Store Image As Blob And Retrieve Blob As Image Using Spring

Image As Blob And Blob As Image Here in this example I am going to show you how to store image as blob into database. While retrieving blob from database I am going to display blob as image. While storing image as blob into database I am going to display a page which will be used for uploading the image….

Spring Boot Application Over HTTPS

Introduction In this example I am going to show you how to start your spring boot application on HTTPS protocol. HTTPS is a secured protocol, whereas HTTP is unsecured protocol. So the data passed over the network using HTTPS protocol are generally encrypted data. The application which I am going to build is in the local environment and for this…

Spring Boot MVC And JDBC CRUD Example

Spring JDBC CRUD In my another tutorial I had shown how to create an example on Spring MVC and JDBC CRUD example using annotations only, but here I am going to use Spring Boot framework. I did not update the other tutorial keeping in mind if someone still needs the example using Spring framework only. Here also I am going…

@WebMvcTest Annotation Example in Spring MVC Applications

Introduction We will see the use of @WebMvcTest annotation in Spring MVC applications. The Spring MVC application may be Spring Boot application as well. The @WebMvcTest annotation can be used not only to test Spring Controllers but also Spring REST Controllers. We will build the applications using both maven and gradle tools. @WebMvcTest annotation is used for unit testing of…

Exception Handling in Spring Boot Application

Table of Contents Introduction Prerequisites Project Setup Entity Class Repository Interface Exception Classes Advice for Exception Spring REST Controller Spring Boot Main Class Testing Exception Handling Source Code Introduction This post will show you an example on exception handling in Spring web application. In other words, you can also say exception handling in Spring MVC. I will use handle exception…

Spring MVC + Angular CRUD Example

In this tutorial we will see the integration of AngularJS with Spring MVC. We are going to create CRUD application using Spring REST API on server side and AngularJS is encapsulated within JSP file on client side. Thus the client will communicate with server asynchronously using AngularJS $http service. If you need PHP version https://roytuts.com/angularjs-php-rest-crud-example/ If you need Codeigniter version…

Spring Service Layer Bean Validation

Introduction In my previous tutorial I have shown how to validate input data coming from client or end user to Spring REST Controller. Now in this tutorial I will show you how to validate data in Spring Service Layer. The reason behind validating input data in Service Layer is, input data from client may not always pass through the REST…

Spring MVC Bean Validator

In this example, I will show you how to build a bean validator for User model object.In my previous example,┬áSpring MVC Custom Validator, I have shown how to validate user input. Validating input received from the user to maintain data integrity is an important part of application logic. The Bean Validation model is supported by constraints in the form of…

Spring MVC Custom Validator

Introduction In this example, I will show you how to build a custom validation (validator) for User model object. This validator is custom implementation of Validator interface. Spring MVC supports validation by means of a validator object that implements the Validator interface. I will write the below validator code in this example to check if the required form fields are…

Spring Boot MVC with Tiles and AJAX

In my previous tutorials I have shown how to create a Spring Boot MVC application, here I will show you how to create an AJAX based Spring Boot MVC application with Tiles. What is Tiles (https://tiles.apache.org/) A free open-sourced templating framework for modern Java applications. Based upon the Composite pattern it is built to simplify the development of user interfaces….