Any modern java web application can not be thought of creating without spring.Its not like it is not possible to create but coding in a plain servlet is a pain.Spring MVC provides clear separation and excellent integration between all the modules.The different annotations such as @Component,@Controller and many more has really made developer life easier while dealing with java web application.
In the below tutorial we have tried to cover all the topics that are required to develop a java web application using spring mvc.
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 ➤
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 ➤
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 ➤
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 ➤
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 ➤
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 ➤
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 ➤
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 ➤
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 ➤
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 ➤
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.
Contact us: firstname.lastname@example.org