Syntax error, annotations are only available if source level is 1.5 or greater解决方法
右键项目,在菜单Project Facets下配置Java的版本对应即可。