wrong reason:
After the official Spring documentation, I found that it was SpringBootTest
replaced in the new version SpringApplicationConfiguration
, so the Bean can be injected normally by changing the annotation to the following form
after modification
refer to: