The sqlite configuration in spring boot is
sqlite.datasource.url=jdbc:sqlite::memory:
I confirmed that the data was inserted, but I want to get this sqlite as a real file.
Do you know what to do?
.properties setting
spring.datasource.url=jdbc:sqlite:file:memorydb.db?mode=memory&cache=shared
test code
Connection conn = DriverManager.getConnection("jdbc:sqlite:file:memorydb.db?mode=memory&cache=shared");
Statement stmt = conn.createStatement();
File tmpFile = File.createTempFile(name, ".db");
stmt.executeUpdate("backup to " + tmpFile.getAbsolutePath());
tmpFile.deleteOnExit();
stmt.close();