Thank you very much for your reply. I changed my code to
When clicking on the button I get an error in the console:
randomPerson JQuery.html:22
XMLHttpRequest cannot load
http://localhost:8080/rest/state/person/name. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. JQuery.html
I could not get the log, but now I see there is a problem. Could you tell me how to solve this problem.