Skip to content

AbstractEmbeddedServletContainerFactory.getExplodedWarFileDocumentRoot() doesn't work on Windows #8100

@bturner

Description

@bturner

I'm using Spring Boot 1.4.3.RELEASE, but the same code exists unchanged on the master branch.

In AbstractEmbeddedServletContainerFactory.getExplodedWarFileDocumentRoot() is the following check:

		if (file != null && file.exists()
				&& file.getAbsolutePath().contains("/WEB-INF/")) {
			String path = file.getAbsolutePath();
			path = path.substring(0, path.indexOf("/WEB-INF/"));
			return new File(path);
		}

If I unzip a Spring Boot "thick war" and run java org.springframework.boot.loader.WarLauncher (as described here), it works on Linux (where / is the file separator) but fails on Windows because the path contains "\WEB-INF\" instead.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions