Revert change that breaks tests in werid way

This commit is contained in:
Dave Syer
2014-02-18 13:07:22 +00:00
parent b088f60082
commit c973847d1f
2 changed files with 3 additions and 12 deletions

View File

@@ -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() {

View File

@@ -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);