初学spring,使用meven配置静态工厂实例化时,报错java.lang.IllegalArgumentException,

不知道什么意思,但是百度后给出建议,更换idea编译版本,降级到1.7(7)版本编译程序,表示可以正常运行,如果是不想或者不会降级,可以将下面代码放到pom.xml中的project标签中,(汗,搞了一下午,哎) ,自学的坑呀,还是看教程好

 


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <target>1.7</target>
                    <source>1.7</source>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

 

 

 

Logo

一站式 AI 云服务平台

更多推荐