2014-12-05 2 views
1

나는 thymeleaf로 REST URL을 만들고 싶습니다. 나는 이런 식으로 뭔가를했습니다 :thymeleaf는 동적 매개 변수/요소로 REST URL을 생성합니다.

<a th:href="@{customer/(${c.id})/edit}">Edit</a> 

출력은 다음과 같습니다 http://localhost:8080/app/customer/($%7Bs.id%7D)/edit

하지만 내가 좋아하는 것이 얻을 :

나는이 어떻게 http://localhost:8080/app/customer/4/edit achive 수

? 도와주세요.

답변

3

Preprocessing라고하는 링크가 필요합니다. 귀하의 경우에는

, 당신은 이런 식으로 그것을 수행해야합니다

<a th:href="@{customer/__${c.id}__/edit}">Edit</a> 
+0

의미가 있습니다. 감사 – masterdany88

관련 문제