当前位置:网站首页>The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
The jar package embedded with SQLite database is deployed by changing directories on the same machine, and the newly added database records are gone
2022-07-01 09:00:00 【CSDN Q & A】
The phenomenon and background of the problem
I have a jar Embedded in the bag sqlite database .db The files are also jar Inside the package , Now there's a problem : I put jar Put the bag in A Add a new record after directory deployment . Then add this jar Packet from A Move the directory to the same machine B Directory deployment , The new record is gone . Logically speaking db The file in jar Inside the package , The new record should still be there . If not saved to jar The inside of the bag db file , Where will it be saved ? Use on the machine everything The tool did not search for a with the same name db file .jar There is only one original in the bag db file
Problem related code , Do not paste screenshots
To configure :( yes springboot It's embedded sqlite)
spring: datasource: url: jdbc:sqlite::resource:db/test.db driver-class-name: org.sqlite.JDBC username: password:What I want to achieve
I hope it's time to jar Replace directory deployment , The record still exists
Take the answer :
Reason found .sqlite Don't modify jar The inside of the bag db file , Will directly generate a temporary db file , Save in C:\Users\ user name \AppData\Local\Temp Inside
边栏推荐
- Shell脚本-case in 和正则表达式
- Embedded Engineer Interview frequently asked questions
- Shell script - definition, assignment and deletion of variables
- 19Mn6 German standard pressure vessel steel plate 19Mn6 Wugang fixed binding 19Mn6 chemical composition
- 个人装修笔记
- C语言学生信息管理系统
- 日常办公耗材管理解决方案
- Centos7 shell脚本一键安装jdk、mongo、kafka、ftp、postgresql、postgis、pgrouting
- Bimianhongfu queren()
- V79.01 Hongmeng kernel source code analysis (user mode locking) | how to use the fast lock futex (Part 1) | hundreds of blogs analyze the openharmony source code
猜你喜欢

19Mn6 German standard pressure vessel steel plate 19Mn6 Wugang fixed binding 19Mn6 chemical composition

Performance improvement 2-3 times! The second generation Kunlun core server of Baidu AI Cloud was launched

jeecg 重启报40001

你了解数据是如何存储的吗?(C整型和浮点型两类)

Matlab tips (16) consistency verification of matrix eigenvector eigenvalue solution -- analytic hierarchy process

MD文档中插入数学公式,Typora中插入数学公式

Bimianhongfu queren()

TV size and viewing distance

Insert mathematical formula in MD document and mathematical formula in typora
![[MFC development (17)] advanced list control list control](/img/e8/24c52cb51defc6c96b43c2ef3232ff.png)
[MFC development (17)] advanced list control list control
随机推荐
Insert mathematical formula in MD document and mathematical formula in typora
Key points of NFT supervision and overseas policies
Introduction to 18mnmo4-5 steel plate executive standard and delivery status of 18mnmo4-5 steel plate, European standard steel plate 18mnmo4-5 fixed rolling
序列化、监听、自定义注解
VSYNC+三重缓存机制+Choreographer
JCL and slf4j
TV size and viewing distance
C语言学生信息管理系统
Advanced C language pointer (Part 2)
AVL树的理解和实现
Redis source code learning (29), compressed list learning, ziplist C (II)
Shell script - positional parameters (command line parameters)
Shell script - definition, assignment and deletion of variables
Understanding and implementation of AVL tree
小鸟识别APP
Shell脚本-字符串
Graduation season, I want to tell you
Nacos - 服务发现
任务、线程、进程 区别
Differences among tasks, threads and processes