wucao219101's recent timeline updates
wucao219101

wucao219101

🏢  爱奇艺
V2EX member #61794, joined on 2014-05-03 19:37:55 +08:00
浦东新区上南一村转租一套 2 室房子
上海  •  wucao219101  •  Jan 17, 2018  •  Lastly replied by derrick1
3
腾讯云推送(信鸽)的一个疑问
程序员  •  wucao219101  •  Aug 17, 2017  •  Lastly replied by l12ab
3
wucao219101's recent replies
Oct 7, 2022
Replied to a topic by andyJado 程序员 `ad hoc`到底是什么意思
Not every data warehouse is necessarily a column store: traditional row-oriented databases and a few other architectures are also used. However, columnar storage can be significantly faster for ad hoc analytical queries, so it is rapidly gaining popularity.

- 摘自《 Designing Data-Intensive Applications 》 101 页

这里 ad hoc 翻译成“临时的”:然而,对于临时的分析查询,列存储可以显著加快速度,因此它正在迅速普及。
Sep 24, 2021
Replied to a topic by nanmu42 Java 请问, Java 如何打出自带依赖的 jar 包?
maven-assembly-plugin / maven-shade-plugin 二选一,如果是 Spring 项目推荐用 maven-shade-plugin 。

https://xxgblog.com/2015/08/07/maven-create-executable-jar/
```java

Properties properties = new Properties();
properties.load(new FileInputStream("/path/test.properties"));

PropertiesPropertySource propertySource = new PropertiesPropertySource("map", properties);
Iterable<ConfigurationPropertySource> propertySources = ConfigurationPropertySources.from(propertySource);

Binder binder = new Binder(propertySources);
Map map = binder.bind("", Map.class).orElse(null);
System.out.println(map);

```

输出:

{java={runtime={name=OpenJDK Runtime Environment, version=16.0.2+7}, vendor=N/A, specification={version=16, name=Java Platform API Specification, vendor=Oracle Corporation}, class={version=60.0}, vm={version=16.0.2+7, specification={version=16, name=Java Virtual Machine Specification, vendor=Oracle Corporation}, vendor=Oracle Corporation, name=OpenJDK 64-Bit Server VM}, home=/usr/lib/jvm/java-16-openjdk, version=16.0.2}, sun={arch={data={model=64}}}}

用的 Spring Boot 的 API:

import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
import org.springframework.core.env.PropertiesPropertySource;
官方的推荐用法怎么是骚操作?
https://redis.io/topics/distlock
supervisor+1
生产环境一直在用的方案
1 最舒适
4 简直辣眼睛
Jan 27, 2021
Replied to a topic by Joker123456789 Java 关于 NIO 非阻塞的问题
你这个代码相当于单线程来处理所有的 IO 事件,如果处理事件的业务逻辑本身有阻塞耗时的逻辑,那么肯定要另外再维护一个线程池。

Node.js 能单线程处理的原因是它所有的业务逻辑都是异步的,没有阻塞的任务存在。Java 不一样,你查询 DB 、调用外部接口、读写文件等,都会阻塞当前线程,所以不去弄个线程池性能肯定上不去。就是 Netty 他也是最好用外部线程池 EventExecutorGroup 来处理业务逻辑的。
问题问的就不对,应该这样问:你们工作履历中是 Spring Boot 多还是直接用 Spring Framework 多?
SSM 中的 M 就是 MyBatis,Spring Boot 也可以结合 MyBatis 不冲突。
毫无逻辑的一句话,Lambda 表达式跟线程没有一点关系,lambda 表达式只是一种语法。

如果是用 Lambda 实现启动 Runnable 线程,确实是会在另一个线程中执行,但是总不能说是"lambda 表达(匿名内部类) 会在另一个线程中执行"吧?
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3880 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms · UTC 00:45 · PVG 08:45 · LAX 17:45 · JFK 20:45
♥ Do have faith in what you're doing.