@@ -0,0 +1,3411 @@
+package com.github.persapiens.jsfboot.jetty;%0A%0Aimport java.io.IOException;%0Aimport java.net.URL;%0Aimport java.net.URLClassLoader;%0Aimport java.security.AccessController;%0Aimport java.security.PrivilegedAction;%0Aimport org.eclipse.jetty.server.Server;%0Aimport org.eclipse.jetty.util.resource.ResourceCollection;%0Aimport org.eclipse.jetty.webapp.WebAppContext;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.autoconfigure.condition.ConditionalOnClass;%0Aimport org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;%0Aimport org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;%0Aimport org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;%0Aimport org.springframework.boot.context.embedded.jetty.JettyServerCustomizer;%0Aimport org.springframework.boot.context.properties.EnableConfigurationProperties;%0Aimport org.springframework.boot.context.web.SpringBootServletInitializer;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.core.io.ClassPathResource;%0A%0A/**%0A * Taken from https://github.com/ghillert/spring-boot-jsp-demo/blob/jetty/src/main/java/com/hillert/JspDemoApplication.java#L78%0A * and from https://github.com/eclipse/jetty.project/issues/420%0A * and from https://github.com/spring-projects/spring-boot/pull/5290%0A */%0A@Configuration%0A@EnableConfigurationProperties(%7B JettyProperties.class %7D)%0A@ConditionalOnClass(JettyEmbeddedServletContainerFactory.class)%0Apublic class JettySpringBootAutoConfiguration extends SpringBootServletInitializer implements EmbeddedServletContainerCustomizer %7B%0A%0A    @Autowired%0A    private JettyProperties jettyProperties;%0A    %0A%09private static final Logger LOGGER = LoggerFactory.getLogger(JettySpringBootAutoConfiguration.class);%0A%0A%09private JettyServerCustomizer jettyServerCustomizer() %7B%0A%09%09return new JettyServerCustomizerImpl();%0A%09%7D%0A%0A%09@Override%0A%09public void customize(ConfigurableEmbeddedServletContainer container) %7B%0A%09%09if (container instanceof JettyEmbeddedServletContainerFactory) %7B%0A            ((JettyEmbeddedServletContainerFactory) container).addServerCustomizers(jettyServerCustomizer());%0A%09%09%7D%0A%09%7D%0A%0A    private class JettyServerCustomizerImpl implements JettyServerCustomizer %7B%0A        @Override%0A        public void customize(Server server) %7B%0A            WebAppContext webAppContext = (WebAppContext) server.getHandler();%0A            %0A            try %7B%0A                ClassPathResource classPathResource = new ClassPathResource(jettyProperties.getClassPathResource());%0A                webAppContext.setBaseResource(new ResourceCollection(classPathResource.getURI().toString()));%0A                %0A                AccessController.doPrivileged(new PrivilegedAction%3CVoid%3E() %7B%0A                    @Override%0A                    public Void run() %7B%0A                        webAppContext.setClassLoader(new URLClassLoader(new URL%5B0%5D, this.getClass().getClassLoader()));%0A                        return null;%0A                    %7D%0A                %7D);%0A                %0A                LOGGER.info(%22Setting Jetty classLoader to META-INF/resources directory%22);%0A            %7D%0A            catch (IOException exception) %7B%0A                LOGGER.error(%22Unable to configure Jetty classLoader to META-INF/resources directory %22 + exception.getMessage());%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

fix #32 JettySpringBootAutoconfiguration created