摘要: 今天用 jstack 调试 java 程序。结束后进程卡死。 ps 查看后发现进程状态是 T1 。它可能是由于进程收到了 SIGSTOP 信号。 解决方法是发送一个 SIGCONT 给进程。 阅读全文
posted @ 2022-08-15 19:28 Demon90s 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 首先在 pom.xml 配置依赖 <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>3.13.3</version> <exclusions> <exclusion> <gr 阅读全文
posted @ 2022-03-29 21:48 Demon90s 阅读(86) 评论(0) 推荐(0) 编辑
摘要: CentOS 安装 在centos上使用源码编译 ftp://lovemiemie.xyz/pub/install_package/ubuntu/redis-4.0.2.tar.gz 解压后进入 redis-4.0.2 目录 输入 make 编译完成。 进入 src 目录。 ./redis-serv 阅读全文
posted @ 2022-03-29 19:56 Demon90s 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 以下,只有一个函数的接口是函数式接口: @FunctionalInterface public interface Functor { void run(); } 它可以接收lambda表达式,可以通过以下方式: 阅读全文
posted @ 2022-03-29 15:22 Demon90s 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 要获取各种bean,需要用到 ApplicationContext 获取它的引用方式是先绑定它: @Component public class AppContext implements ApplicationContextAware { private static ApplicationCon 阅读全文
posted @ 2022-03-28 20:36 Demon90s 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 默认会使用 application.properties 作为启动相关的配置。 比如 http 端口可以配置为: 启动时就会指定此配置作为 http 端口: 也可以自定义配置 然后通过 @Value 注解从配置自动初始化字段 异常情况 如果配置找不到会怎么样?将抛出异常并结束程序。 如果配置转换不了 阅读全文
posted @ 2022-03-28 14:56 Demon90s 阅读(1294) 评论(0) 推荐(0) 编辑
摘要: 使用注解 @Component ,进程启动后会创建一个单例的bean 。 代码如: @Component public class Hello { private final Logger logger = LoggerFactory.getLogger(Hello.class); @PostCon 阅读全文
posted @ 2022-03-28 11:32 Demon90s 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 修改 pom.xml 内容如 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-i 阅读全文
posted @ 2022-03-28 11:14 Demon90s 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 如图,打开setting 然后搜索 Font 阅读全文
posted @ 2022-03-26 23:26 Demon90s 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 命令是 sudo snap install intellij-idea-community --classic 启动完毕后,再安装 jdk1.8 (因为这个版本是我工作环境用的) 接着,就可以创建一个JAVA文件,然后运行测试了 阅读全文
posted @ 2022-03-26 23:05 Demon90s 阅读(910) 评论(0) 推荐(0) 编辑