java ServiceLoader/ServiceManager原理

private final ServiceManager serviceManager = ServiceLoader.load(ServiceManager.class).getDefault();

private final RequestHandler requestHandler = ServiceLoader.load(RequestHandler.class).getDefault();

<!-- common-web-support内部使用servlet容器支持的ServletContainerInitializer机制,
自动添加了CharacterEncodingFilter和ServiceWatcher,请删除web.xml中的配置 -->




原文地址:https://www.cnblogs.com/songxinya/p/9442707.html