在Eclipse中声明package级别的注解时会显示错误,解决方法如下:
?
1.在对应的package(如:com.sin90.hibernate.beans)内新建一个名为package-info.java文件
?
2.在package-info.java内添加注解:
@org.hibernate.annotations.GenericGenerator(name = "g_id", strategy = "uuid")package com.sin90.hibernate.beans;
?
that's all!