IDEA开发常见问题汇总

本人是小白,在开发过程中很多都是自己摸索过了的,当然这过程中难免会遇到各种各样的问题,一般都是从网上找解决的方案。

但是网上很多都是照搬别人的文章,照搬也就算了。还是一堆无效的方法,简直就是在乱写。

下面的这些问题,都是博主亲自遇到,并且解决有效的,分享给大家,少走弯路。

一、1099端口被占用
问题报错:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ibatis.reflection.Reflector (file:/F:/code/apache-maven-3.5.2-bin/org/mybatis/mybatis/3.4.6/mybatis-3.4.6.jar) to method java.lang.Class.checkPackageAccess(java.lang.SecurityManager,java.lang.ClassLoader,boolean)
WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.reflection.Reflector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

解决方案:
idea->run->edit configurations->JVM options
添加这样 **--illegal-access=deny --add-opens java.base/java.lang=ALL-UNNAMED**一句话
在这里插入图片描述
二、

问题报错:

[ERROR] 不再支持源选项 5。请使用 6 或更高版本。
[ERROR] 不再支持目标选项 1.5。请使用 1.6 或更高版本。

解决方案:
解决这种错误只要在pom.xml文件中配置你的JDK版本信息即可

方式一:

<properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
</properties>
///我的JDK是1.8,所以写1.8。你只需把JDK改成自己的版本即可

方式二:

 <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

IDEA热部署无效

文章:https://blog.csdn.net/weixin_40496191/article/details/116995599

猜你喜欢

转载自blog.csdn.net/weixin_41717861/article/details/122054747