我是在自学中,按照视频做,此处错误出现在Hibernate 反转 映射,表1:PetInfo 表2:PetDiary
此处错误是在反转生成的entity.PetInfo中出现 想不通...private Set<PetDiary> diarts = new HashSet<PetDiary>();报错:Multiple ers at this line
- The type HashSet is not generic; it cannot be parameterized with
arguments <PetInfo>
- Syntax error, parameterized types are only available if source level
is 5.0
- The type Set is not generic; it cannot be parameterized with
arguments <PetInfo>
- Syntax error, parameterized types are only available if source level
is 5.0
此处错误是在反转生成的entity.PetInfo中出现 想不通...private Set<PetDiary> diarts = new HashSet<PetDiary>();报错:Multiple ers at this line
- The type HashSet is not generic; it cannot be parameterized with
arguments <PetInfo>
- Syntax error, parameterized types are only available if source level
is 5.0
- The type Set is not generic; it cannot be parameterized with
arguments <PetInfo>
- Syntax error, parameterized types are only available if source level
is 5.0
右键点击你工程,properties-->java compiler--->右边有选项config workspace setting
-->修改compiler compilance level,修改成5.0即可