当前位置:网站首页>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
边栏推荐
猜你喜欢

Phishing identification app

"Analysis of 43 cases of MATLAB neural network": Chapter 30 design of combined classifier based on random forest idea - breast cancer diagnosis

Glitch free clock switching technology

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

Memory size end

Installing Oracle EE

如何一站式高效管理固定资产?

Football and basketball game score live broadcast platform source code /app development and construction project

小鸟识别APP

Glitch Free时钟切换技术
随机推荐
Matlab tips (23) matrix analysis -- simulated annealing
我想知道手机注册股票开户的流程?另外,手机开户安全么?
Only in China! Alicloud container service enters the Forrester leader quadrant
Computer tips
Embedded Engineer Interview Question 3 Hardware
你了解数据是如何存储的吗?(C整型和浮点型两类)
目标检测的yolov3、4、5、6总结
Shell script - positional parameters (command line parameters)
Yidian Yidong helps enterprises to efficiently manage equipment and improve equipment utilization
How to manage fixed assets efficiently in one stop?
Interrupt sharing variables with other functions and protection of critical resources
JCL 和 SLF4J
What are the differences between the architecture a, R and m of arm V7, and in which fields are they applied?
Jetson nano installs tensorflow GPU and problem solving
[MFC development (17)] advanced list control list control
电视机尺寸与观看距离
DataBinding源码分析
足球篮球体育比赛比分直播平台源码/app开发建设项目
Shell脚本-case in语句
3. Detailed explanation of Modbus communication protocol