I have this spring boot
build. I want to consume rest controller
@GetMapping
API.
I know the credentials. I can open its dashboard using login page.
But I am not able to consume Rest apis
from postman due authorization setting.
Below is the REST api
that I want to consume in postman client
@GetMapping("/students")
@ApiOperation(value = "", authorizations = {@Authorization(value = "apiKey")})
public Response getAllStudents() {
return Response
.ok()
.setPayload(studentService.getStudents());
}
As I mentioned I know the username/password. How can I generate this apiKey
field and configure in my postman
window.
In postman go to Authorization > API key. enter your credentials and it should work
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.