I try doing confirmation registration from email, on the email I send this code:
String token = UUID.randomUUID().toString(); //for send email
String confirmationUrl = "<a href='" +
"http://localhost:8080/registrationConfirm.html?token="
+ token+"'>Click for end Registration</a>";
helper.setText("message", confirmationUrl.toString());
I receive something like this:
- http://localhost:8080/registrationConfirm.html?token=88ab5907-6ab5-40e2-89d5-d6a7e8cea3c2
How I can receive this
88ab5907-6ab5-40e2-89d5-d6a7e8cea3c2
in spring?
I want doing a new controller, he will be check if 88ab5907-6ab5-40e2-89d5-d6a7e8cea3c2 exist in DB, then he activated registration, if no - talk about misstake. And I do not understand how the conroller will be look, I do so
@RequestMapping(value = "/token", method = RequestMethod.POST)
public @ResponseBody
String getAttr(@PathVariable(value="token") String id,
) {
System.out.println(id);
return id;
}