File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
src/main/java/com/spring/loader Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 1
- language : java
2
- sudo : false
3
- addons :
4
- apt :
5
- packages :
6
- - oracle-java8-installer
1
+ language : java
Original file line number Diff line number Diff line change 1
1
package com .spring .loader ;
2
2
3
3
import static java .util .Arrays .asList ;
4
- import static java .util .stream .Collectors .toList ;
5
4
6
5
import java .util .ArrayList ;
7
6
import java .util .List ;
@@ -42,11 +41,12 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
42
41
int total = conventionalResources .size () + s3Locations .size ();
43
42
44
43
if (total > 0 ) {
45
- List <Resource > allResources = s3Locations .stream ()
46
- .map (resourceLoader ::getResource )
47
- .collect (toList ());
44
+ List <Resource > allResources = new ArrayList <>();
45
+ for (String location : s3Locations ) {
46
+ allResources .add (resourceLoader .getResource (location ));
47
+ }
48
48
49
- conventionalResources . forEach ( allResources :: add );
49
+ allResources . addAll ( conventionalResources );
50
50
51
51
super .setLocations (allResources .toArray (new Resource [allResources .size ()]));
52
52
}
You can’t perform that action at this time.
0 commit comments