更新时间:2022-05-27 22:05:09
以完全回答你的问题,但Hibernate的本地查询工具可以让你加载一个文件。
Not sure I have enough information to fully answer your question, but Hibernate's Native Query facilities might let you load a file that way.
session.createSQLQuery("LOAD DATA INFILE :filename INTO TABLE testtable (text,price)").setString("filename", "/path/to/MyFile.csv").executeUpdate();