mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Polish
This commit is contained in:
parent
43f8a71af4
commit
5c6dd52e9a
@ -419,8 +419,6 @@ public class PropertiesLauncher extends Launcher {
|
||||
/**
|
||||
* Convenience class for finding nested archives (archive entries that can be
|
||||
* classpath entries).
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
private static final class ArchiveEntryFilter implements EntryFilter {
|
||||
@Override
|
||||
@ -433,8 +431,6 @@ public class PropertiesLauncher extends Launcher {
|
||||
/**
|
||||
* Convenience class for finding nested archives that have a prefix in their file path
|
||||
* (e.g. "lib/").
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
private static final class PrefixMatchingArchiveFilter implements EntryFilter {
|
||||
private final String prefix;
|
||||
|
@ -53,19 +53,22 @@ public abstract class Archive {
|
||||
mainClass = manifest.getMainAttributes().getValue("Start-Class");
|
||||
}
|
||||
if (mainClass == null) {
|
||||
String url = "UNKNOWN";
|
||||
try {
|
||||
url = getUrl().toString();
|
||||
}
|
||||
catch (Exception e) {
|
||||
// ignore
|
||||
}
|
||||
throw new IllegalStateException(
|
||||
"No 'Start-Class' manifest entry specified in " + url);
|
||||
"No 'Start-Class' manifest entry specified in " + this);
|
||||
}
|
||||
return mainClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
try {
|
||||
return getUrl().toString();
|
||||
}
|
||||
catch (Exception e) {
|
||||
return "archive";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the manifest of the archive.
|
||||
* @return the manifest
|
||||
|
@ -71,4 +71,4 @@ public class FileEncodingApplicationContextInitializer implements
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user