Could not find class [o.s.cloud.client.discovery.noop.NoopDiscoveryClientAutoConfiguration]

Regarding this error, I have previously recorded a troubleshooting article, which may not be clearly described: Could not find classNoopDiscoveryClientAutoConfiguration

Let’s re-describe this problem here. When the project is started, the following error will be reported:
Insert image description here
The error log description is very clear and the target class cannot be found:NoopDiscoveryClientAutoConfiguration

First look at the dependency package corresponding to this target class.
Insert image description here
The class is not found in the directory of the corresponding dependency package, but there must be a place in the project that references this class, so this error is reported. You can continue to search for the existence of this dependency package. (other versions of spring-cloud-commons).
Insert image description here
Obviously, there is an error-reporting class in this low-version dependency, and you can see that the target class has a strikethrough and has been discarded. You can open this class to see the replaced class after discarding.
Insert image description here
So just exclude dependencies that reference lower versions.

Guess you like

Origin blog.csdn.net/weixin_43275277/article/details/127534791