Spring MVC Tutorial Topics

Storing Hashed Password to Database in Java(Using Bcrypt)

By Dhiraj Ray, 07 May,2017

Storing passwords in plain text in databse is vulnerable to security. This article is about storing hashed password to databse in java. Doing so it becomes impossible for even BDAs to extract the real passwords. There are many hashing algorithms such as MD5, SHA-1, SHA-2 etc to hash a password but adding a salt to the password provides extra security. In this article we will be using jBCrypt, which internally generates a random salt while encoding passwords, to encode our plain text passwords and store in DB.... Read more ➤

Spring MVC PDF and Excel View Example (using iText)

By Dhiraj Ray, 05 April,2017

This tutorial explains about generating PDF and excel documents in Spring web mvc using iText PDF library. It uses the content negotiation view resolver provided by spring to generate PDF and excel views. Here we will be creating a simple spring mvc web application using annotations and java configs. This application will be capable of negotiating views between pdf and excel based on the HTTP request. If you are looking for json, xml and html content view resolver then... Read more ➤

Spring MVC Content Negotiating Viewresolver Example(Json, XML, HTML)

By Dhiraj Ray, 26 March,2017

This tutorial explains about contentnegotiatingviewresolver in spring mvc using annotations and java configs. Here we will have a single controller that can produce responses in different data format such as json, html or xml etc. based on the request url without creating any extra layers. We only require to have contentnegotiatingviewresolver configurations that will do this for us. Now, let us implement this with the following spring mvc contentnegotiatingviewresolver example. In this example we will have responses in json, xml and html based on the request file name.... Read more ➤

Spring MVC annotation Example with JavaConfig

By Dhiraj Ray, 25 March,2017

This tutorial aims to provide a complete guide for spring mvc. We will be developing a web app using spring mvc and try to learn spring mvc architecture, its configurations and different concepts involved while creating a spring mvc annotation example. All the configurations will be based on annotations and java config and we will be overriding methods defined in WebApplicationInitializer and WebMvcConfigurerAdapter class to achieve this.... Read more ➤

Different AOP Terminologies and Keywords

By Amit Swain, 28 January,2017

In this post, let us discuss about different Aspect Oriented Programming(AOP) terminologies which will help to understand the upcoming spring AOP tutorials.It is very much important to understand the basic AOP terms and usage first to understand the internals of AOP, it's implementation and usage using Spring framework.The AOP terminologies described here are not specific to... Read more ➤

Spring 5 Features and Enhancements

By Dhiraj Ray, 24 January,2017

As we all must be knowing the second milestone of Spring Framework 5.0 got released in September last year as a new functional web framework.It is completely based on Reactive Programming Model.Spring Framework 5.0 has many major enhancements and upgrades with Java 8 as a minimum... Read more ➤

Caching in Spring Example + Ehcache + Cacheable + Annotation/JavaConfig

By Dhiraj Ray, 25 November,2016

As we know EhCache is a widely used caching library. Spring provides easy annotation based integration mechanism of ehcache using @Cacheable. Here we will be creating a sample application which will use @Cacheable annotation to cache the user detail. We will try to fetch the same user detail again and again and compare the time required t fetch it. The spring configuration... Read more ➤

Writing Junit Tests with Spring4 Mvc

By Dhiraj Ray, 19 November,2016

Today we will take a look into writing Junit test cases with Spring Mvc. We will be creating a sample Spring MVC app with hibernate and write few test cases using Junit and clear our... Read more ➤

spring4 hibernate integration example + annotation/JavaConfig

By Dhiraj Ray, 19 November,2016

There are numerous spring hibernate intgration example available on the web but most of them are not using java configuration. But many spring app these days are being developed using java config. Hnce, today we will be dicussing about spring hibernate integration with complete java configguration, no xml at all. This post can be considered as an upgradation of my previous post where we discussed Spring AngularJS intgration but without DB connection... Read more ➤

spring mvc + angularjs integration example + annotation/JavaConfig

By Dhiraj Ray, 13 November,2016

This post provides an example of spring mvc and angularjs integration. Here we will be using annotation based spring configuration with Beans defined in Java. We will be creating a simple single page application to show the user details in a bootstrap table after a successful login.... Read more ➤

Spring JMS Example + ActiveMQ + Annotation/JavaConfig

By Dhiraj Ray, 07 November,2016

Today let us integrate JMS and Spring with activemq with an example. This will be a simple JMS producer and consumer app. Before we start let's make some concepts clear.

What is JMS

Java Message Service (JMS) is an application program interface (API) that supports the formal... Read more ➤

Suggest more topics in suggestion section or write your own article and share with your colleagues.