From the course: HTMX with Thymeleaf in Spring Boot
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Response header annotations - Spring Boot Tutorial
From the course: HTMX with Thymeleaf in Spring Boot
Response header annotations
- [Instructor] With 04-09_begin/records-management loaded in IntelliJ, let's take a look at the HTMX spring-boot header response annotations that can be applied directly to a controller in our code base. Go ahead and run the mvn spring-boot:run command in the terminal. The HTMX Spring Boot Library offers some convenience annotations that perform similar functionality in utilizing the httpServletResponse or the HtmxResponse object where we set the HTMX headers dynamically. These annotations include the following as you can see here. Of these, we're going to take a deeper dive into a selection, which include HxPushUrl, HxRedirect, HxRefresh, and HxReplaceUrl. Let's also take a brief look at the GitHub repository for the HTMX Spring Boot Library annotations. We can click into each of these annotations to access the Java doc for more details. And the Java doc as well has links to connect to the HTMX.org site for more detailed documentation on what each response header does. Let's start…
Contents
-
-
-
-
-
-
(Locked)
Control visibility using HTMX request headers9m 32s
-
(Locked)
Browser influence with HTMX response headers with HX-Trigger11m 47s
-
(Locked)
Set HX-Retarget using HttpServletResponse9m 56s
-
(Locked)
Use HX-Reselect and HX-Reswap with HttpServletResponse21m 41s
-
(Locked)
Integrate and use the htmx-spring-boot library8m 50s
-
(Locked)
Method invocation filtering with HxRequest annotation9m 41s
-
(Locked)
Thymeleaf convenience processors for HTMX integrations6m 51s
-
(Locked)
Use HTMX response headers to set HTMX response headers14m 30s
-
(Locked)
Response header annotations8m 21s
-
(Locked)
-
-
-
-