首页 > 代码库 > annotations are not supported at this language level解决办法

annotations are not supported at this language level解决办法

 

写spring helloController.clss  ,@Controller  报错

IDEA下报错:annotations are not supported at this language level

 

解决:

1. File -> Project Structure -> Project -> Project Language Level 选择“8 Lamdas Type Annotations etc”

2. 如果没有改选项请先安装和配置JDK1.8

3. 如果为Maven项目,请将pom.xml中maven-compiler-plugin中<configuration>中的<source>和<target>配置为1.8


annotations are not supported at this language level解决办法