Blog Archives

Spring MVC Custom Validation Annotations

Last tutorial, I showed how to validate a form using annotations. This works great for simple validations, but eventually, you’ll need to validate some custom rules that aren’t available in the out-of-the-box annotations. For example, what if you need to

Posted in Spring Tagged with: , , , ,

Spring MVC Form Validation with Annotations Tutorial

This tutorial with full source code will show how to validate a form submission in Spring MVC using JSR-303 annotations. You can grab the code for this tutorial on GitHub if you want to follow along. One of the most

Posted in Spring Tagged with: , , ,

Spring MVC – Easy REST-Based JSON Services with @ResponseBody

Spring 3 makes JSON REST services really easy. This tutorial will show you how in just a few steps.You can grab the code on GitHub. PrerequisitesYou should have a working Spring MVC Application. If you do not already have a working

Posted in Spring Tagged with: , , , ,

Spring MVC Form Tutorial

This tutorial will show how to handle a form submission in Spring MVC. We will define a controller to handle the page load and the form submission.You can grab the code on GitHub. Prerequisites: You should have a working Spring

Posted in Spring Tagged with: , , ,

Simple Spring MVC Web Application using Gradle

This post will be similar to our previous post, Simple Gradle Web Application, except we will now use Spring MVC, rather than raw servlets. It is really easy to get a basic Spring MVC application running with Gradle.You can download

Posted in Gradle, Spring Tagged with: , , ,

Spring Java Configuration

I have found that a lot of Spring developers I know still do not know about or use Spring Java Configuration (aka JavaConfig). Spring 3.0 introduced this feature which allows Spring to be configured entirely in Java – no more

Posted in Spring Tagged with: , , ,

Explicitly defining a Spring MVC Annotation-Based Controller

Beginning with Spring MVC 2.5, MVC controllers can be declared using the @Controller annotation. Spring picks up the controller through this declaration in Spring servlet application context: <context:component-scan base-package=”com.myapp.controller” /> In the past, this has worked perfectly for me, and I

Posted in Java, Spring Tagged with: , ,

Sponsored

Follow Me

RSS FeedFollow me on Twitter