From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
@InitBinder overview - Spring Tutorial
From the course: Complete Guide to Spring MVC
@InitBinder overview
- [Instructor] InitBinder overview. What is InitBinder? InitBinder is an annotation in Spring MVC that allows developers to customize the how incoming HTTP request data, like form fields or query parameters, are bound to model objects. It acts as an intermediary between raw request data and your applications data model. Think of it as a data transformation checkpoint, ensuring that the data your application receives is in the correct format, and properly validated before being processed any further. There are a few main functionalities of InitBinder, one of those being data binding customization. This modifies how Spring binds incoming request parameters to model object properties. For example, you want to prevent binding sensitive fields like password, or you want to customize handling for specific fields, like formatting dates properly. So let's look at this example that we have here on the screen, where we want to exclude sensitive fields. You don't want to have things like…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Declaration overview4m 32s
-
(Locked)
Declaration: AOP proxies6m 23s
-
(Locked)
Mapping requests overview5m 19s
-
Mapping requests: URI patterns5m 50s
-
(Locked)
Mapping requests: Consumable media types4m
-
(Locked)
Mapping requests: Producible media types3m 53s
-
(Locked)
Handler methods overview3m 9s
-
(Locked)
Handler methods: Method arguments2m 54s
-
(Locked)
Handler methods: Return values5m 2s
-
(Locked)
Handler methods: Type conversion4m 47s
-
(Locked)
Model3m 16s
-
(Locked)
@InitBinder overview7m 46s
-
(Locked)
Validation3m 33s
-
(Locked)
Exceptions overview4m 39s
-
(Locked)
Exceptions: Method arguments3m 56s
-
(Locked)
Exceptions: Return values6m 47s
-
(Locked)
Controller advice10m 32s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-