IntelliJ IDEA语法报错"Usage of API documented as @since 1.6+"的解决办法
具体报错内容如下:
This inspection finds all usages of methods that have @since tag in their documentation. This may be useful when development is performed under newer SDK version as the target platform for production
报错图:

解决方案:

看代码意思是,那个方法是自Java1.6开始的,但是,看我图上面的language level 才是5,级别不够,所以,就报错了。在这个编辑器里面有好 几个地方都有关于这个jdk的版本的设置。
这么改完之后,乍一看好像没问题了,但是,一会问题就又出来啦,还得如下,在maven build 里面添加如下的插件,设置一下Java的版本就好啦。
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对脚本之家的支持。如果你想了解更多相关内容请查看下面相关链接
相关文章
spring boot 开发soap webservice的实现代码
这篇文章主要介绍了spring boot 开发soap webservice的实现代码,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧2019-01-01
解读@SpringBootApplication注解有什么用
@SpringBootApplication是SpringBoot的核心注解,主要包含@SpringBootConfiguration、@EnableAutoConfiguration和@ComponentScan三个注解,这些注解共同简化了Spring应用的配置工作,并使得通过主程序类就可以启动SpringBoot应用2024-09-09
logstash将mysql数据同步到elasticsearch方法详解
这篇文章主要为大家介绍了logstash将mysql数据同步到elasticsearch方法详解,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪2022-12-12
SpringBoot整合Mybatis实现商品评分的项目实践
本文介绍了SpringBoot整合Mybatis-plus框架实现对商品评分的功能实现流程和前端接口实现过程,文中通过示例代码介绍的非常详细,需要的朋友们下面随着小编来一起学习学习吧2024-02-02


最新评论