美文网首页
解决maven中不支持注解 使用source5或更高版本启用注解

解决maven中不支持注解 使用source5或更高版本启用注解

作者: Stefan0 | 来源:发表于2019-10-29 15:47 被阅读0次

在学习spring时遇到了以下问题:使用mvn compile命令的时候报错了

查了下google说是maven的maven-compiler-plugin插件版本较低的缘故,在pom文件中添加以下配置即可解决:

<build>

            <groupId> org.apache.maven.plugins

            <artifactId>maven-compiler-plugin

                <source>1.5

                <target>1.5

                <encoding>UTF-8

</build>

相关文章

网友评论

      本文标题:解决maven中不支持注解 使用source5或更高版本启用注解

      本文链接:https://www.haomeiwen.com/subject/pohgvctx.html