@Test public void shouldUseSpringContainerAsDefaultProvider() throws ServletException { when(context.getInitParameter(BasicConfiguration.CONTAINER_PROVIDER)).thenReturn(null); assertThat(config.getProvider().getClass(), is(typeCompatibleWith(SpringProvider.class))); }
public ContainerProvider getProvider() throws ServletException { Class<? extends ContainerProvider> providerType = getProviderType(); logger.info("Using {} as Container Provider", providerType); try { return providerType.getDeclaredConstructor().newInstance(); } catch (InvocationTargetException e) { throw new ServletException(e.getCause()); } catch (Exception e) { throw new ServletException(e); } }
BasicConfiguration { public ContainerProvider getProvider() throws ServletException { Class<? extends ContainerProvider> providerType = getProviderType(); logger.info("Using {} as Container Provider", providerType); try { return providerType.getDeclaredConstructor().newInstance(); } catch (InvocationTargetException e) { throw new ServletException(e.getCause()); } catch (Exception e) { throw new ServletException(e); } } }
BasicConfiguration { public ContainerProvider getProvider() throws ServletException { Class<? extends ContainerProvider> providerType = getProviderType(); logger.info("Using {} as Container Provider", providerType); try { return providerType.getDeclaredConstructor().newInstance(); } catch (InvocationTargetException e) { throw new ServletException(e.getCause()); } catch (Exception e) { throw new ServletException(e); } } BasicConfiguration(ServletContext servletContext); }
BasicConfiguration { public ContainerProvider getProvider() throws ServletException { Class<? extends ContainerProvider> providerType = getProviderType(); logger.info("Using {} as Container Provider", providerType); try { return providerType.getDeclaredConstructor().newInstance(); } catch (InvocationTargetException e) { throw new ServletException(e.getCause()); } catch (Exception e) { throw new ServletException(e); } } BasicConfiguration(ServletContext servletContext); ContainerProvider getProvider(); boolean hasBasePackages(); String[] getBasePackages(); String getEncoding(); String getWebinfClassesDirectory(); ServletContext getServletContext(); boolean isClasspathScanningEnabled(); }
BasicConfiguration { public ContainerProvider getProvider() throws ServletException { Class<? extends ContainerProvider> providerType = getProviderType(); logger.info("Using {} as Container Provider", providerType); try { return providerType.getDeclaredConstructor().newInstance(); } catch (InvocationTargetException e) { throw new ServletException(e.getCause()); } catch (Exception e) { throw new ServletException(e); } } BasicConfiguration(ServletContext servletContext); ContainerProvider getProvider(); boolean hasBasePackages(); String[] getBasePackages(); String getEncoding(); String getWebinfClassesDirectory(); ServletContext getServletContext(); boolean isClasspathScanningEnabled(); static final String CONTAINER_PROVIDER; static final String ENCODING; static final String BASE_PACKAGES_PARAMETER_NAME; static final String SCANNING_PARAM; }