SpringCloud GateWay Failed to instantiate [org.springframework.cloud.gateway.discovery.DiscoveryL…

Recently, the company needs to rebuild the system permission framework. I use gateway as the gateway.

I have to admit that gateway configuration is really good. In the past, when using nginx, I had to configure a lot of messy things, now I don’t need to configure certificates

There was no problem when the project was running, but when the jar package was run alone after packaging, it encountered this problem. After looking for it all afternoon, a netizen told me that as long as you use the gateway gateway, you will encounter this problem.

resolvent:

Add configuration in the POM file of gateway

<dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
</dependency>

Perfect solution

Read More: