当前位置:网站首页>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
边栏推荐
- 【MFC开发(17)】高级列表控件List Control
- 足球篮球体育比赛比分直播平台源码/app开发建设项目
- Shell脚本-字符串
- Pain points and solutions of equipment management in large factories
- Yolov3, 4, 5 and 6 Summary of target detection
- The fixed assets management system enables enterprises to dynamically master assets
- 3. Detailed explanation of Modbus communication protocol
- Interrupt sharing variables with other functions and protection of critical resources
- 钓鱼识别app
- 日常办公耗材管理解决方案
猜你喜欢
随机推荐
序列化、监听、自定义注解
Shell script -select in loop
如何一站式高效管理固定资产?
How can enterprises and developers take the lead in the outbreak of cloud native landing?
Yidian Yidong helps enterprises to efficiently manage equipment and improve equipment utilization
Shell script -for loop and for int loop
中小企业固定资产管理办法哪种好?
yolov5训练可视化指标的含义
1.jetson与摄像头的对接
电视机尺寸与观看距离
Is it safe to dig up money and make new shares
Bimianhongfu queren()
Shell脚本-while循环详解
个人装修笔记
Shell script - definition, assignment and deletion of variables
"Analysis of 43 cases of MATLAB neural network": Chapter 30 design of combined classifier based on random forest idea - breast cancer diagnosis
Vsync+ triple cache mechanism +choreographer
【MFC开发(16)】树形控件Tree Control
C语言指针的进阶(下)
如何解决固定资产管理和盘点的难题?









