Java的SPI简单例子

SPI: Service Provider Interface

import java.sql.Driver;

ServiceLoader<Driver> serviceLoader = ServiceLoader.load(Driver.class);
for (Driver service : serviceLoader) {
    System.out.println(service);
}


Previous     Next
ponxu /
Categories Java  Tags Java