I have checkout spring-boot-http-3-jetty and run. It's working as expected[http-3(h3) from 2nd request] furthermore, I want to test it with POST request with body so, I have added the following thymeleaf dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
To handle form request added Controller
package com.example.demo;
import java.io.IOException;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import jakarta.servlet.ServletRequest;
@Controller
public class UploadController {
@GetMapping("/upload")
public String displayUploadForm(ServletRequest request, Model model) throws IOException {
System.out.println("displayUploadForm:" + request.getProtocol());
model.addAttribute("message", "hello from upload controller...");
return "uploadForm";
}
@PostMapping("/handleUpload")
public String handleFileUpload(@RequestParam("file") MultipartFile file, Model model) {
model.addAttribute("message", "You successfully uploaded " + file.getOriginalFilename() + "!");
return "uploadForm";
}
}
Added thymeleaf template
<html>
<body>
<div th:if="${message}">
<h2 th:text="${message}"/>
</div>
<div>
<form method="POST" enctype="multipart/form-data" action="/handleUpload">
<table>
<tr><td>File to upload:</td><td><input type="file" name="file" /></td></tr>
<tr><td></td><td><input type="submit" value="Upload" /></td></tr>
</table>
</form>
</div>
</body>
</html>
While hitting https://demo.local:9002/upload It shows form like and getting response header
alt-svc h3=":9002"; ma=86400; persist=1
But after submitting form getting below error

I have import certificate in firefox.
Also with RestController GET request working with http-3 after initial request served with (http-2 & response header alt-svc h3=":9002"; ma=86400; persist=1
also notice sometime its working http-2 for consecutive request.
Note:
- checking with latest firefox
- java version 19 on windows os
Its there any other config need to check to work with http-3(h3)?
Thanks in advance :-)

Your code is working fine for me. I'm using latest Firefox on MacOS.
The repository that you took specifically talks about setting up the project on MacOS not on Windows.
Note: For Windows, HTTP/3 is only supported on Windows Server 2022 & Windows 11. It's not enabled by default.
Important: Follow this SO Answer - How Do You Enable HTTP/3 on IIS? to enable HTTP/3 on Windows and also to make your codebase work.
I'm providing the steps how I followed for MacOS.
After I checkout the code, I executed the command -
brew install --HEAD -s curl/curl.rbto install curl on my system.Executed the following the command to set the curl on the PATH:
Then I have edited the host file via command
sudo nano /etc/hosts(MacOS). In your case, you have to editC:\Windows\System32\Drivers\etc\hostsfor Windows to add the following ip and domain name.Now, I have added the code base you have provided. Project Structure.