OpenEntityManagerInViewFilter Problems

前端 未结 3 689
难免孤独
难免孤独 2020-12-16 07:30

I have scoured this site among others for answers in getting OpenEntityManagerInViewFilter to work. I have a standard User object that references a roles object with a many

3条回答
  •  自闭症患者
    2020-12-16 08:08

    You DAOs look normal, only the Annotation '@Dao' is a bit suprising. In normal case one would use '@Repository' -- That is a special form of '@Component' but (and that is not very well documented) it adds some special features.

    One of that special features is an exception translation, and when I remember right there, was one other feature that enhance the Entity Manager annotated bz @PersistenceContext with some extra feature that somehow deals with threads and assigning the right entity manager to the right thread.

    So I would recommend to try to replace @Dao by @Repository.

提交回复
热议问题