Example

  1. @SpringBootApplication
  2. @EnableDiscoveryClient
  3. @MapperScan(basePackages = {"io.github.chenshun00.springcloud.provider"})
  4. @ServletComponentScan("io.github.chenshun00.springcloud.provider")
  5. public class ProviderExampleApplication implements HelloController {
  6. public static void main(String[] args) {
  7. SpringApplication.run(ProviderExampleApplication.class, args);
  8. }
  9. }

EnableDiscoveryClient