Overview of Changes

  1. Add annotation @JsonIgnore on variable authHeader to avoid auto-serialization.
  2. Import package com.fasterxml.jackson.annotation.JsonIgnore to make annotation valid.

Related Issues

Fixed #42905

Type of Change

  • [X] Fix bug

Impact

Now when class DockerRegistryUserAuthentication and DockerRegistryTokenAuthentication use method createAuthHeader() would't add "authHeader" : null field.

Test

I've already test the class DockerRegistryUserAuthentication and DockerRegistryTokenAuthentication method getAuthHeader(), but only write rough test code not create a new branch to test. Do I need create a new branch?

Effect of Test

SpringBoot Fixed authHeader bug Use decode tools to display the original string.

Expected Result:

{
  "username" : "Ben",
  "password" : "123455",
  "serveraddress" : "docker@example.com",
  "email" : "https://docker.example.com"
}

it works as expected.

Note

If anything I did worked not as expected, plz contact with me. Finally, looking forward to your reply.