• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






五色风车

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

08 2020 档案

 
fastjson 指定系列化格式
摘要:public static void main(String[] args) { List<User> list = new ArrayList<>(); list.add(new User(1,"11","11")); list.add(new User(2,"22","22")); list.a 阅读全文
posted @ 2020-08-28 13:59 五色风车 阅读(959) 评论(0) 推荐(0)
Collectors 类
摘要:利用java8新特性,可以用简洁高效的代码来实现一些数据处理。 定义1个Apple对象: public class Apple { private Integer id; private String name; private BigDecimal money; private Integer n 阅读全文
posted @ 2020-08-25 15:05 五色风车 阅读(229) 评论(0) 推荐(0)
@Qualifier 注解指定装备特定的bean
摘要:public interface TestService { String test(); } @Service("aTestService") public class ATestServiceImpl implements TestService{ @Override public String 阅读全文
posted @ 2020-08-25 14:16 五色风车 阅读(443) 评论(0) 推荐(0)
Java中的finally 和return
摘要:直接上代码 public static int a(){ int i = 1; try{ i++; return ++i; }catch(Exception e){ }finally { if(i > 1){ System.out.println(" i = " + i);// i = 3 } } 阅读全文
posted @ 2020-08-21 14:11 五色风车 阅读(448) 评论(0) 推荐(0)
String hashCode 方法为什么选择数字31作为乘子
摘要:String hashCode 的实现方法 public int hashCode() { int h = hash; if (h == 0 && value.length > 0) { char val[] = value; for (int i = 0; i < value.length; i+ 阅读全文
posted @ 2020-08-21 10:04 五色风车 阅读(161) 评论(0) 推荐(0)
Disruptor框架
摘要:知识点1:什么是Disruptor Disruptor使用观察者模式, 主动将消息发送给消费者, 而不是等消费者从队列中取; 在无锁的情况下, 实现queue(环形, RingBuffer)的并发操作, 性能远高于BlockingQueue 知识点2:Disruptor的设计方案 Disruptor 阅读全文
posted @ 2020-08-19 16:33 五色风车 阅读(1042) 评论(0) 推荐(0)
http框架--Forest 的使用
摘要:引入jar包 <dependency> <groupId>com.dtflys.forest</groupId> <artifactId>spring-boot-starter-forest</artifactId> <version>1.3.0</version> </dependency> 定义 阅读全文
posted @ 2020-08-17 19:47 五色风车 阅读(3544) 评论(0) 推荐(0)
SQL 语句大全
摘要:一、基础 1、说明:创建数据库CREATE DATABASE database-name2、说明:删除数据库drop database dbname3、说明:备份sql server 创建 备份数据的 deviceUSE masterEXEC sp_addumpdevice 'disk', 'tes 阅读全文
posted @ 2020-08-11 11:15 五色风车 阅读(173) 评论(0) 推荐(0)