![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
昊天卍上帝
我是一名程序员!!!!
展开
-
jdk8 中stream 的使用
collect是stream 的收集器,负责转化收集结果1.使用stream过滤List<User> userList = arrayList.stream().filter(m->m.getAge() > 18).collect(Collectors.toList());2.类型转化List<Integer> userAges = arrayL...原创 2020-05-07 16:44:25 · 724 阅读 · 0 评论 -
Java 中使用多线程时有时会需要等多线程执行的代码执行完的后续操作
try { List<String> fileList = getLocalCacheFiles(); final CountDownLatch countDownLatch = new CountDownLatch(fileList.size()); for (String file : fileList) { new Thread(()-&...原创 2019-11-08 17:07:27 · 426 阅读 · 0 评论 -
spring-security权限控制
Spring Security(16)——基于表达式的权限控制目录1.1通过表达式控制URL权限1.2通过表达式控制方法权限1.2.1使用@PreAuthorize和@PostAuthorize进行访问控制1.2.2使用@PreFilter和@PostFilter进行过滤1.3使用hasPermission表达式...转载 2019-10-30 16:45:09 · 567 阅读 · 0 评论 -
springboot使用自己的tomcat
1.修改pom.xml<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusi...原创 2019-10-29 15:31:45 · 741 阅读 · 0 评论 -
以前遇到的问题
一.a,b互换,要求不使用中间变量将他们互换public void change(a,b){int a=2; int b=3;a=a+b;b=a-b;a=a-b;}二.1、 面向对象的特征有哪些方面 1.抽象:抽象就是忽略一个主题中与当前目标无关的那些方面,以便更充分地注意与当前目标有关的方面。抽象并不打算了解全部问题,而只是选择其转载 2017-08-11 09:44:29 · 200 阅读 · 0 评论 -
我的java笔记
一.解决中文乱码问题思路1: 自己配置过滤器步骤: (1) 开发一个Filter(2) 在web.xml中配置过滤器MyFiltercom.hsp.web.filter.MyFilterMyFilter/*思路2:使用spring框架提供的处理中文乱码的过滤器encodingorg.springframework.web.filt原创 2017-08-11 09:59:27 · 201 阅读 · 0 评论