小编DMi*_*ine的帖子

Spring框架集合被驱逐

我有这个错误:

2020-11-16 22:36:09.313 ERROR 19428 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: collection was evicted; nested exception is org.hibernate.HibernateException: collection was evicted] with root cause

org.hibernate.HibernateException: collection was evicted
    at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:43) ~[hibernate-core-5.4.22.Final.jar:5.4.22.Final]
    at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102) ~[hibernate-core-5.4.22.Final.jar:5.4.22.Final]
Run Code Online (Sandbox Code Playgroud)

我创建一个 API REST 应用程序,我的实体具有以下组成:

public class Label {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long Id;

    @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy = "label")
    private Set<Release> releases;
Run Code Online (Sandbox Code Playgroud)
public class Release …
Run Code Online (Sandbox Code Playgroud)

java spring hibernate

10
推荐指数
2
解决办法
2万
查看次数

在laravel中上传文件

伙计们,我阅读了在 laravel 中上传文件的文档......但我不明白(我是初学者)这是我的 image.blade.php

{{Form::open(['url'=>'administrator/store ', 'files' => true])}} 
{!!Form::file('image') !! } 
{!! Form::submit('next')!!} 
{{Form::close()}} 
Run Code Online (Sandbox Code Playgroud)

管理员控制器

use Storage; 
use Illuminate\Http\Request; 
use App\Http\Controllers\Controller; 

public function store(Request $request) {
Storage::put($request->image, 'test') ;
} 
Run Code Online (Sandbox Code Playgroud)

我不明白我将在函数中放入什么..... 请帮帮我... 问候!

php laravel

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

hibernate ×1

java ×1

laravel ×1

php ×1

spring ×1