提示していただいたコードを見る限りでは、ボタンそれぞれを押すと、/test/(customerIdの値) のURLへリクエストしています。以下はcustomerIdの値が cs001 の時のHTMLです。
html
1<form action="/test/cs001" method="post">
2 <button value="cs001">cs001</button>
3</form>
パラメータを渡したいとのことですが、すでにURLのパスが customerId の値を含めて送信しているので、もしそのURLの設計に誤りがなければ、以下のControllerで受けることができます。
java
1import org.springframework.stereotype.Controller;
2import org.springframework.web.bind.annotation.GetMapping;
3import org.springframework.web.bind.annotation.PathVariable;
4import org.springframework.web.bind.annotation.PostMapping;
5import org.springframework.web.bind.annotation.RequestMapping;
6import org.springframework.web.servlet.ModelAndView;
7
8@Controller
9@RequestMappings("/test")
10public class CustomerController {
11
12 @PostMapping("/{customerId}")
13 public ModelAndView samplePost(ModelAndView mnv, @PathVariable String customerId) {
14
15 }
16}
余談ですが、リンクにパラメータを付与する方法の詳細は、以下の公式ドキュメントにある日本語訳を参考にしてください。
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf_ja.html#%E3%83%AA%E3%83%B3%E3%82%AFurl