0

I know spring lemon is available at application-url/api/core. So, on my development environment for instance, it should be available at http:/ /localhost:8081/api/core/. And on subscription, users should get the following link : http:/ /localhost:8081/api/core/users/{VerificationCode}/verify.

Unfortunately, my links are failing in several ways :
1- My application was failing, listening on default 9000 port, until I specify lemon.application-url=http:/ /localhost:8081 in application-dev.properties. It looks like Spring Lemon doesn't learn application-url from where it's run. Is this behaviour the normal one ?

2- The verification link sent by Spring Lemon is http:/ /localhost:8081/users/{VerificationCode}/verify. Shouldn't it be http:/localhost:8081/api/core/users/{VerificationCode}/verify instead ? How do I correct it ?

3- Furthermore, the RequestMapping on the verifyUser method in LemonController.java shows that it needs a POST request. Can a verification link be a POST one ? Even when I manually correct the link to be correct, I got : Request methog 'GET' not supported. Any help to fix this ?

mozexty
  • 44
  • 1
  • 6

1 Answers1

0

http://localhost:8081/api/core/users/{VerificationCode}/verify would be the API end-point, not for the user to visit (and so it's a POST). The front-end page for the user should be located at http://localhost:8081/users/{VerificationCode}/verify, from where you would call the API using AJAX.

lemon.application-url is used for specifying the front-end location, using which things like the verification link could be built. If you don't provide it, I think http://localhost:9000 is assumed.

Spring Lemon can be used for developing only the API, but not the front-end.

Sanjay
  • 8,755
  • 7
  • 46
  • 62