|
|
@ -16,7 +16,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.autoconfigure.web;
|
|
|
|
package org.springframework.boot.autoconfigure.web;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
@ -92,14 +91,14 @@ public class ResourceProperties implements ResourceLoaderAware {
|
|
|
|
public Resource getWelcomePage() {
|
|
|
|
public Resource getWelcomePage() {
|
|
|
|
for (String location : getStaticWelcomePageLocations()) {
|
|
|
|
for (String location : getStaticWelcomePageLocations()) {
|
|
|
|
Resource resource = this.resourceLoader.getResource(location);
|
|
|
|
Resource resource = this.resourceLoader.getResource(location);
|
|
|
|
if (resource.exists()) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (resource.exists()) {
|
|
|
|
resource.getURL();
|
|
|
|
resource.getURL();
|
|
|
|
return resource;
|
|
|
|
return resource;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (IOException ex) {
|
|
|
|
}
|
|
|
|
// Ignore
|
|
|
|
catch (Exception ex) {
|
|
|
|
}
|
|
|
|
// Ignore
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|