随笔分类 - Java
Java 的某些坑
摘要:read 时需要指定 entity EasyExcel.read(file.getInputStream(), XLSEntity.class, this);
阅读全文
摘要:前言 假设有个 Person 类, 其有两个属性 name 和 age 这里有两个对象 person1 和 person2 person1 的 name 为 p, age 为 null person2 的 name 为 null, age 为 123 直接使用 BeanUtils.copyPrope
阅读全文
摘要:祖传配置辣 借助 SpringBoot 的配置 效果如图 <configuration> <statusListener class="ch.qos.logback.core.status.NopStatusListener"/> <conversionRule conversionWord="cl
阅读全文
摘要:如图,SQLITE 的这个驱动似乎不支持使用 getBLOB,但 SQLITE 确实支持存储 BLOB 数据,如果用 Mybatis 也会遇到同样的问题, 毕竟 MP 是基于 MyBatis 的 解决办法也很简单,加上这个参数就行 或者也可以给某个字段加上 typeHandler 的参数,然后写一个
阅读全文
摘要:只要使用 Lombok 的 Constructor 相关注解就可以了
阅读全文
摘要:不能直接点 否则就会出现错误 因为直接点运行出现的是 Gradle 任务 正常情况下使用的是 JUnit 任务 因此,需要手动点击 + 创建 JUint 任务 设置好 JDK、运行模块、测试类 就好了
阅读全文
摘要:看代码 ⑧ @Select("SELECT * FROM t_emps WHERE name like \"%\"#{pattern}\"%\"") List<Emp> findPatternInEmp(@Param("pattern") String pattern);
阅读全文
摘要:首先, 需要有一个 像这样的 atlas 文件 和一个像这样的 图片 文件 这个可以通过 工具 生成 然后就是写代码的环节了 定义两个关键变量 private val atlas = TextureAtlas(Gdx.files.classpath("t/123.atlas")) private v
阅读全文
摘要:主要就是这两个地方 plugins { id 'java' id 'com.github.johnrengelman.shadow' version '7.1.2' } shadowJar { manifest.attributes.put("Implementation-Version", arc
阅读全文
摘要:LibGDX 有两种判断按键是否按下的方法 Gdx.input.isKeyJustPressed(int keyCode) 和 Gdx.input.isKeyPressed(int keyCode) 前者在按键 按下 与 松开 都会返回 true 后者只有当按键 按下 时才会返回 true 因此,
阅读全文
摘要:将 jdbcUrl 设置为这个就好 数据库文件路径为 main/resources/chinese.db jdbc:sqlite::resource:chinese.db 2022-1-30 补充 使用这种方法方法存放 SQLite 文件有个坏处,不能对其进行 写 操作 如图 看似能成功写入,实际上
阅读全文
摘要:如图 解决方法: 目前最新 kotlin 版本为 1.6.10 添加 org.jetbrains.kotlin:kotlin-reflect:1.6.10 进编译路径 参考 implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.10")
阅读全文
摘要:/** * 递归获取路径下所有文件 * * @param path 要获取的路径 * @param depth 初始深度 * @param maxDepth 最大递归深度 * @return 该路径下所有文件 */ private static List<File> rListFiles(File
阅读全文
摘要:艹,原来这个仓库有教程的 仓库地址 首先,添加 插件 javafxplugin plugins { kotlin("jvm") version "1.6.10" application id("org.openjfx.javafxplugin").version("0.0.9") } 然后,配置 j
阅读全文
摘要:引入 ShadowJar 插件 主要是第一、五行 import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { kotlin("jvm") version "1.6.10" java id("com.githu
阅读全文
摘要:后端接口为 http://localhost/upload 后端获取文件用的 key 为 file 文件名为 1.png 等价于 input type="file" name="media"> curl 命令: curl -F "file=@1.png" http://localhost/uploa
阅读全文
摘要:将配置文件里的 设置为 最终效果 就好了 最后,Swagger3 的访问地址是 http://localhost:9999/swagger-ui/index.html
阅读全文
摘要:@Suppress("DEPRECATION") @Suppress("UNCHECKED_CAST") @Suppress("UNUSED") @SuppressLint("PrivateApi")
阅读全文
摘要:依赖 implementation("org.apache.xmlgraphics:fop:2.6") // https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-codec implementation("org.apach
阅读全文

浙公网安备 33010602011771号