摘要: springboot kotlin 读取resources 下文件的路径 val resource = javaClass.classLoader.getResource("filename.txt") val path = resource?.path 在上面的代码中,filename.txt是要 阅读全文
posted @ 2023-04-09 22:01 梦过长亭 阅读(243) 评论(0) 推荐(0) 编辑
摘要: kotlin minOf 发出NoSuchElementException异常,该如何解决 minOf 函数在处理空集合时会抛出 NoSuchElementException 异常。解决该问题的方法取决于你的具体需求和代码实现方式。 如果你期望集合可能为空,你可以使用 minOrNull 函数代替 阅读全文
posted @ 2023-04-09 13:52 梦过长亭 阅读(51) 评论(0) 推荐(0) 编辑
摘要: Spring Boot AOP(Pointcut) 是一种面向切面编程的技术,用于拦截方法的调用并在方法执行前后插入代码。Pointcut(切点)是一个表达式,它描述了要拦截哪些方法。下面是关于Spring Boot AOP Pointcut的详细解释: Pointcut表达式语言: Spring 阅读全文
posted @ 2023-03-15 14:32 梦过长亭 阅读(191) 评论(0) 推荐(0) 编辑
摘要: yum install epel-release yum install yum-plugin-copr yum copr enable ngompa/snapcore-el7 yum -y install snapd systemctl enable --now snapd.socket snap 阅读全文
posted @ 2023-03-05 20:33 梦过长亭 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 上传twish.sh与mbedtls-2.28.0安装包 chmod 755 twist.sh./twist.sh cd mbedtls-2.28.0 make clean make SHARED=1 CFLASS=-fPIC make install 阅读全文
posted @ 2023-01-25 17:30 梦过长亭 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1. 查看当前时间 date -R 2. 设置时区 timedatectl set-timezone Asia/Shanghai 3. 设置时间 先设置日期,再设置时间 date -s MM/DD/YY date -s hh:mm:ss hwclock --systohc # 写入bios 阅读全文
posted @ 2023-01-13 12:01 梦过长亭 阅读(128) 评论(0) 推荐(0) 编辑
摘要: ubuntu默认情况是无法用root进行ssh登录的,要登录需要如下配置: 1. 执行以下命令,设置 root 密码。 sudo passwd root 输入root的密码,按Enter 2. 执行以下命令,打开 sshd_config 配置文件 sudo vim /etc/ssh/sshd_con 阅读全文
posted @ 2023-01-12 12:04 梦过长亭 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 如果有外部配置文件,需要在命令启动时指定。 jar 包启动时指定配置文件 application.yml nohup java -jar -Dserver.port=8080 glass.jar --spring.config.location=file:./application-prod.yml 阅读全文
posted @ 2023-01-12 08:38 梦过长亭 阅读(2303) 评论(0) 推荐(0) 编辑