JettyEmbedded needs a Server instance earlier for applyXmlConfigurations and its ResourceFactory to operate properly

This commit is contained in:
Joakim Erdfelt 2022-08-05 12:59:22 -05:00
parent fe21198499
commit fee8f2b4f4
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
2 changed files with 2 additions and 8 deletions

View File

@ -246,14 +246,11 @@ public class JettyEmbedder extends AbstractLifeCycle
private void configure() throws Exception
{
// apply any configs from jetty.xml files first
Server tmp = ServerSupport.applyXmlConfigurations(server, jettyXmlFiles, jettyProperties);
Server tmp = ServerSupport.applyXmlConfigurations(new Server(), jettyXmlFiles, jettyProperties);
if (tmp != null)
server = tmp;
if (server == null)
server = new Server();
server.setStopAtShutdown(stopAtShutdown);
//ensure there's a connector

View File

@ -246,14 +246,11 @@ public class JettyEmbedder extends ContainerLifeCycle
private void configure() throws Exception
{
//apply any configs from jetty.xml files first
Server tmp = ServerSupport.applyXmlConfigurations(server, jettyXmlFiles, jettyProperties);
Server tmp = ServerSupport.applyXmlConfigurations(new Server(), jettyXmlFiles, jettyProperties);
if (tmp != null)
server = tmp;
if (server == null)
server = new Server();
server.setStopAtShutdown(stopAtShutdown);
//ensure there's a connector