Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 图像上载功能在服务器上不起作用_Spring_Hibernate - Fatal编程技术网

Spring 图像上载功能在服务器上不起作用

Spring 图像上载功能在服务器上不起作用,spring,hibernate,Spring,Hibernate,在我的应用程序中,我上传了新的war文件,那个时应用程序中并没有显示以前的图像 我的java应用程序将图像存储在数据库中 听起来在休眠配置中,您的hbm2ddl.auto属性设置为create或create drop 当设置为createhibernate时,它将删除当前架构,并在启动时创建一个新架构。当设置为create drop时,hibernate将在关机时删除架构。因此,您的所有数据都将丢失 检查答案 如果是这种情况,则使其更新。如果您对模型做了任何更改,这将更新模式,否则一切都将保持原

在我的应用程序中,我上传了新的war文件,那个时应用程序中并没有显示以前的图像


我的java应用程序将图像存储在数据库中

听起来在休眠配置中,您的
hbm2ddl.auto
属性设置为
create
create drop

当设置为
create
hibernate时,它将删除当前架构,并在启动时创建一个新架构。当设置为
create drop
时,hibernate将在关机时删除架构。因此,您的所有数据都将丢失

检查答案

如果是这种情况,则使其更新。如果您对模型做了任何更改,这将更新模式,否则一切都将保持原样


如果情况并非如此,则您需要显示配置和代码,或者如果发现任何异常,请检查日志。

当我在服务器上上载新war文件时,请详细说明我的项目,此时我的图像未显示。。需要查看代码。我的hibernate配置hbm2ddl.auto设置为“无”。但图像不开放