How to add Bearer automatically when swagger makes a request

private List<ApiKey> securitySchemes() {
    List<ApiKey> apiKeyList= new ArrayList();
    apiKeyList.add(new ApiKey("Authorization", "Authorization", "header"));
    return apiKeyList;
}

the dialog box generated to add Token is as follows:

users enter "Bearer ${token}", which is troublesome. How to realize that users only need to enter ${token}, and swagger can automatically add "Bearer"

.
Feb.14,2022

Please use Bearer Authentication instead of apiKey .
it will automatically add

to http header.
Authorization: Bearer <token>

schema configuration

openapi: 3.0.0
...
-sharp 1) Define the security scheme type (HTTP bearer)
components:
  securitySchemes:
    bearerAuth:            -sharp arbitrary name for the security scheme
      type: http
      scheme: bearer
      bearerFormat: JWT    -sharp optional, arbitrary value for documentation purposes
-sharp 2) Apply the security globally to all operations
security:
  - bearerAuth: []         -sharp use the same name as above

Bearer Authentication

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3dd7f-2c3af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3dd7f-2c3af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?