From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
URI handling and building - Spring Tutorial
From the course: Complete Guide to Spring MVC
URI handling and building
- [Instructor] URI handling and building. Uniform resource identifiers are fundamental to web interactions. Spring MVC offers tools to build, manipulate, and encode URIs in a consistent, secure, and maintainable manner, making them essential for modern web applications. URI utilities are crucial because when building web applications, you frequently need to do three things. One, create dynamic URLs with path variables and create parameters. Two, encode URLs to ensure special characters are safely transmitted. Three, reuse or manipulate URLs by adding removing parts like paths, perimeters, or fragments. Spring MVC provides utilities like UriComponentBuilder and DefaultUriBuilderFactory to handle these requirements effectively. We're going to walk through four examples of how to use URI handling. Dynamic URIs with variables. You can dynamically construct URIs using placeholders for path variables and query parameters. For example, we're creating a hotel page here and Westin and 123 are…
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.