有一个非常酷的spi架构示例,其中有maven在baeldung:
教程:https://www.baeldung.com/java-spi
存储库:https://github.com/eugenp/tutorials/tree/master/java-spi
它有……
为其创建运行配置 com.baeldung.rate.app.MainApp 。添加VM参数
com.baeldung.rate.app.MainApp
-Djava.ext.dirs=$JAVA_HOME/jre/lib/ext:./exchange-rate-impl/target:./exchange-rate-impl/target/depends