StringBuilder 与 StringBuffer

可变性 String 不可变 在 String 中, byte[] value 由 final 修饰 public final class String implements java.io.Serializable, Comparable<String>, CharSequence,

acautomaton Published on 2025-03-09

Java synchronized 与 volatile

synchronized关键字可以保证并发编程的三大特性:

acautomaton Published on 2025-03-05

Java String 为什么不可变?

查看 String 的源码: public final class String implements java.io.Serializable, Comparable<String>, CharSequence, Constable, ConstantDesc

acautomaton Published on 2025-03-04

Java 基元的装箱

引文 运行如下代码: public class Main { public static void main(String[] args) { Integer a = 100; Integer b = 100; System.out.print

acautomaton Published on 2025-03-04

Java 中为什么只有值传递?

值传递 pass by value:在调用函数时,将实际参数复制一份传递到函数中。 引用传递 pass by reference: 在调用函数时,将实际参数的地址直接传递到函数中。 先说结论 Java 是将实际参数的地址拷贝传递到函数中,所以属于值传递。 基本类型及其包装类 执行以下代码: publ

acautomaton Published on 2025-03-04

docker-compose 部署 ElasticSearch / Kibana 8.17.2

ElasticSearch 与 Kibana 的版本对应关系:https://www.elastic.co/cn/support/matrix#matrix_compatibility docker-compose.yml services: elasticsearch: contain

acautomaton Published on 2025-02-23

解决启动Flutter App时出现s_glGetUniformLocation:2206 GL error 0x502错误

错误: 一种临时解决方式:修改AVD使用软件渲染。 该解决方案来自

acautomaton Published on 2024-08-11

解决Flutter编译一直显示Running Gradle task 'assembleDebug'...

Flutter版本:3.22.3 该解决办法源自https://www.cnblogs.com/fanqisoft/p/17528904.html,但是原文已不适用于最新版本。

acautomaton Published on 2024-08-11

Java 21通过Maven导入全部Spring Framework包

<properties> <maven.compiler.source>21</maven.compiler.source> <maven.compiler.target>21</maven.compiler.target> <project.buil

acautomaton Published on 2023-09-14

redis.conf

# Redis configuration file example. # # Note that in order to read the configuration file, Redis must be # started with the file path as first argumen

acautomaton Published on 2023-08-01
acautomaton Published on 2023-07-22

SpringBoot 引入 Log4j2

一、引入依赖 SpringBoot默认使用logback的日志框架,所以需要排除logback,否则会有依赖冲突 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-star

acautomaton Published on 2023-07-22

EMQX使用JwtToken进行访问控制

一、认证 进入后台界面后,选择访问控制->客户端认证 在右上角选择创建 认证方式选择JWT JWT无需选择数据源 配置参数 JWT来自于password 加密方式hmac-based Secret填写预设的JWT私钥,关闭Base64编码 配置负载验证 Claim Expected Value cl

acautomaton Published on 2023-06-25

基于 Springboot 3.0.x 使用MQTT协议连接到EMQX服务器

一、引入依赖 <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-stream</artifact

acautomaton Published on 2023-06-24