Spring MVC File Upload Validation Example

This tutorial shows you about Spring MVC File Upload Validation Example. This example uses Spring validator to validate the uploaded file. When the file is empty or exceeds the maximum allowed upload size, the exception is caught and response a appropriate message. If you don’t know about Spring MVC yet, firstly you should refer to … Read more

Json Tree Model Example using Jackson API

This post introduces Json Tree Model Example using Jackson API. Actually, JSON can be represented as a Tree (similar to DOM tree). Therefore, we are possible to traverse to individual nodes in the tree in order to access/edit their values. Let’s start to build Json Tree Model Example JACKSON dependency in pom.xml There are several … Read more

How to sort Hashmap by key in Java

This tutorial shows you how to sort hashmap by key in java using java.util.TreeMap. Beside it also shows how to sort a hashmap in Ascending or Descending order by key or value using a custom Comparator and Java 8 Lambda expression. Sorted HashMap By Key Example You sort a java.util.HashMap by putting all the entries … Read more

Spring MVC Annotation Example

This tutorial shows how to create a Spring MVC Annotation Example or build a basic Spring MVC Web Application without web.xml configuration. Spring MVC 4 is a main part of Spring Frameworks and is great for you to build web applcation. Table of contents: 1. Project Structure 2. Maven Dependencies 3. Create the Controller 4. … Read more

Convert Java Object to/from JSON using JACKSON API

In this tutorial, we will show you how to use Jackson 2.x to convert Java object to/from JSON using Jackson API. The class ObjectMapper is the main api of Jackson 2.x used for data-binding. It comes with several reader/writer methods to preform the conversion from/to Java and JSON. Quick Reference Convert Java object to JSON … Read more

Please share it if you found this useful
Hide Buttons