File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
spring-webmvc/src/main/java/org/springframework/web/servlet/resource Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2013 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
34
34
import org .springframework .http .MediaType ;
35
35
import org .springframework .util .Assert ;
36
36
import org .springframework .util .ClassUtils ;
37
+ import org .springframework .util .CollectionUtils ;
37
38
import org .springframework .util .FileCopyUtils ;
38
39
import org .springframework .util .StringUtils ;
39
40
import org .springframework .web .HttpRequestHandler ;
@@ -95,7 +96,7 @@ public void setLocations(List<Resource> locations) {
95
96
96
97
@ Override
97
98
public void afterPropertiesSet () throws Exception {
98
- if (logger .isWarnEnabled ()) {
99
+ if (logger .isWarnEnabled () && CollectionUtils . isEmpty ( this . locations ) ) {
99
100
logger .warn ("Locations list is empty. No resources will be served" );
100
101
}
101
102
}
You can’t perform that action at this time.
0 commit comments