package com.roy.shardingDemo.SPI;

import java.util.ServiceLoader;

/**
 * Author： roy
 * Description：
 **/
public class SPITest {
    public static void main(String[] args) {
        ServiceLoader<Animal> animals = ServiceLoader.load(Animal.class);
        animals.forEach(animal -> animal.cry());
    }
}
