2021
01-17
01-17
Nginx中break与last的区别详析
先说区别last,重写后的规则,会继续用重写后的值去匹配下面的location。break,重写后的规则,不会去匹配下面的location。使用新的规则,直接发起一次http请求了。Nginx配置文件server{listen88;server_name_;location/break{#location1rewrite^/break/(.*)$/bak/$1break;}location/last{#location2rewrite^/last/(.*)$/bak/$1last;}location/bak{#location3default_type...
继续阅读 >
Lambda的forEach表达式用起来很爽啊,最近开发中用来遍历了一下Map,结果就翻车了......大致场景如下:publicstaticvoidmain(String[]args){HashMap<String,String>map=newHashMap<>();map.put("1","001");map.put("2","002");map.put("3","003");map.put("4","004");map.put("5","005");map.forEach((k,v)->{if(v.contains("3")){System.out.println("找到你了呦......");return;}...