Revert change that breaks tests in werid way
This commit is contained in:
@@ -304,7 +304,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
|
||||
// Or maybe there is a document root in a well-known location
|
||||
file = file != null ? file : getCommonDocumentRoot();
|
||||
if (file == null && this.logger.isWarnEnabled()) {
|
||||
this.logger.info("None of the document roots "
|
||||
this.logger.debug("None of the document roots "
|
||||
+ Arrays.asList(COMMON_DOC_ROOTS)
|
||||
+ " point to a directory and will be ignored.");
|
||||
}
|
||||
@@ -340,11 +340,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
|
||||
}
|
||||
|
||||
private File getWarFileDocumentRoot() {
|
||||
File file = getArchiveFileDocumentRoot(".war");
|
||||
if (file != null) {
|
||||
return file;
|
||||
}
|
||||
return getArchiveFileDocumentRoot(".jar");
|
||||
return getArchiveFileDocumentRoot(".war");
|
||||
}
|
||||
|
||||
private File getCommonDocumentRoot() {
|
||||
|
||||
@@ -131,12 +131,7 @@ public class JettyEmbeddedServletContainerFactory extends
|
||||
File root = getValidDocumentRoot();
|
||||
if (root != null) {
|
||||
try {
|
||||
if (!root.isDirectory()) {
|
||||
handler.setBaseResource(Resource.newClassPathResource(""));
|
||||
}
|
||||
else {
|
||||
handler.setBaseResource(Resource.newResource(root));
|
||||
}
|
||||
handler.setBaseResource(Resource.newResource(root));
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
|
||||
Reference in New Issue
Block a user