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

大型工厂设备管理痛点和解决方案

Glitch Free时钟切换技术

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

Which method is good for the management of fixed assets of small and medium-sized enterprises?

足球篮球体育比赛比分直播平台源码/app开发建设项目

MySQL optimization

Nacos - 配置管理

How to solve the problem of fixed assets management and inventory?

Only in China! Alicloud container service enters the Forrester leader quadrant
随机推荐
Nacos - gestion de la configuration
Introduction to 18mnmo4-5 steel plate executive standard and delivery status of 18mnmo4-5 steel plate, European standard steel plate 18mnmo4-5 fixed rolling
动态代理
Centos7 shell script one click installation of JDK, Mongo, Kafka, FTP, PostgreSQL, PostGIS, pgrouting
Flink interview questions
Key points of NFT supervision and overseas policies
Shell script - array definition and getting array elements
Screenshot tips
基础:3.opencv快速入门图像和视频
[MFC development (17)] advanced list control list control
JCL 和 SLF4J
嵌入式工程师面试题3-硬件
Promise异步编程
Only in China! Alicloud container service enters the Forrester leader quadrant
Nacos - Configuration Management
Shell script -if else statement
Bimianhongfu queren()
What is the material of 16mo3 steel plate? What is the difference between 16mo3 and Q345R?
Embedded Engineer Interview frequently asked questions
Shell script - definition, assignment and deletion of variables