使用Annotation @EnableSpringDataWebSupport后抛出异常

时间:2015-05-21 16:35:03

标签: spring hibernate jpa spring-data-jpa

在保存实体处抛出异常

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: attempt to create merge event with null entity

使用注释@EnableSpringDataWebSupport后。没有注释一切都有效!

WebConfig

 //code
    @EnableSpringDataWebSupport
    public class WebConfig extends WebMvcConfigurerAdapter

//控制器

@RequestMapping(method = POST, value = "*****")
    public String typeForm(@Valid @ModelAttribute Type,
                           BindingResult bindingResult,
                           RedirectAttributes rAttr)

1 个答案:

答案 0 :(得分:0)

在这里观看Spring Jira。这起作用包括spring-data-jpa 1.7.2.RELEASE