How to create a java restful web service to create token using keycloak and validate it?

i need java based restapi example through which i can create the jwt token with my own specific clientid and clientsecret though postman . and later i can verify them too .