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中的配置 -->




posted on 2018-08-08 14:44  songxinya  阅读(257)  评论(0编辑  收藏  举报