fix nested loop

This commit is contained in:
DOHA 2018-09-17 23:47:09 +03:00
parent c3f2c6dee9
commit e9e971d384
1 changed files with 3 additions and 2 deletions

View File

@ -28,8 +28,9 @@ public class MainController {
public void getFilters() {
FilterChainProxy filterChainProxy = (FilterChainProxy) springSecurityFilterChain;
List<SecurityFilterChain> list = filterChainProxy.getFilterChains();
list.forEach(chain -> chain.getFilters()
.forEach(filter -> System.out.println(filter.getClass())));
list.stream()
.flatMap(chain -> chain.getFilters().stream())
.forEach(filter -> System.out.println(filter.getClass()));
}
@RequestMapping(method = RequestMethod.GET, value = "/foos/{id}")