background picture of the home page

Hi,Friend

技术,游戏,生活

java 关闭windows输入法

这段Java代码使用JNA库,通过调用Windows系统API函数,实现了对输入法的控制。代码包含了打开和关闭输入法的功能,使用`ImmGetContext`、`ImmAssociateContext`、`ImmReleaseContext`等函数来管理输入法上下文。代码中使用了`Native.register("imm32")`来注册Native库,以及`User32`类来获取前台窗口句柄。 通过控制输入法上下文,程序可以屏蔽输入法的影响。

thumbnail of the cover of the post

清除数据库内所有表的数据【MySQL】

这个MySQL存储过程用于清除指定数据库的所有表数据。它首先定义了一个名为`delAllTableData`的存储过程,该过程接受数据库名称作为参数。然后,它循环遍历该数据库的所有表,并使用`TRUNCATE TABLE`语句清空每个表。最后,调用存储过程,传入需要清除数据的数据库名称。该方法高效地清空数据库所有表数据。

thumbnail of the cover of the post

项目升级java17遇到的问题与解决方案

本文介绍了将项目从 Java 8 升级到 Java 17,并升级 Spring Boot 到 3.x 和 Spring Cloud 到 2022.0.0.0 过程中遇到的问题及解决方案。主要问题包括:代码修改(例如,将 `javax` 包替换为 `jakarta` 包,更新 Swagger 注解等),以及依赖冲突导致的 `No spring.config.import property has been defined`、`无法解析符号 'Session'` 等错误。解决方案包括添加必要的依赖,例如 `spring-cloud-starter-bootstrap`、`jakarta.websocket-client-api`,以及修正 `pagehelper` 等依赖的版本以解决兼容性问题,以及`spring-cloud-starter-loadbalancer` 依赖。文章提供了具体的 Maven 依赖修改示例。

thumbnail of the cover of the post

windows远程桌面无法复制文件

Windows远程桌面无法复制文件的问题,可以通过结束rdpclip.exe进程或重新运行rdpclip.exe来解决。若问题仍然存在,尝试关闭并重新打开远程桌面。

thumbnail of the cover of the post

@Scheduled定时不执行

Spring Boot下@Scheduled定时任务不执行可能由三个原因导致:1. 启动类未添加@EnableScheduling注解;2. 定时任务类未被Spring扫描到,需要添加@Component或@Service注解;3. 定时任务位于Controller类中,应将其移动到Service层或单独的组件类中。 解决方法分别为:在启动类添加@EnableScheduling注解,在定时任务类添加@Component或@Service注解,以及将定时任务移至Service层或独立的Service类并添加@Component注解。

thumbnail of the cover of the post

geos编译安装

geos编译安装 当前环境 系统: Linux localhost.localdomain 4.19.90-89.11.v2401.ky10.aarch64 #1 SMP Thu Apr 25 18:20:10 CST 2024 aarch64 aarch64 aarch64 GNU/Linux c

thumbnail of the cover of the post

cmake 编译安装

cmake 编译安装 下载 其他版本下载地址: https://cmake.org/files/ wget https://cmake.org/files/v3.30/cmake-3.30.0.tar.gz 卸载旧版本 yum -y remove cmake 解压 tar -zxvf cmake

thumbnail of the cover of the post

由于StackOverflower错误,无法完成对web应用程序[]的批注的扫描

由于StackOverflowError导致无法扫描Web应用程序,可能的根本原因包括Xss设置过低和非法循环继承依赖。问题原因在于Maven打包的war包格式异常或Tomcat无法解析。解决方案包括:1. 执行Maven clean命令重新打包war包;2. 使用解压缩工具解压war包,删除原war包后启动。

thumbnail of the cover of the post

int转byte数组 - java

java int与byte数组互相转换方式 int 转 byte[] 低字节在前(低字节序) public static byte[] toLH(int n) { byte[] b = new byte[4]; b[

thumbnail of the cover of the post

更新make到最新版本4.3

本文描述了如何在 CentOS 7 x86_64 系统上将 make 更新到最新版本 4.3 的步骤。首先,下载 make-4.3.tar.gz 安装包,解压后配置,使用 ./configure --prefix=/usr 指令指定安装路径。接下来,依次执行 make, make check, make install 命令进行编译安装。最后,使用 make -v 命令验证安装结果。

thumbnail of the cover of the post