gpt4 book ai didi

java - 哪个是 Spring 4 支持的最低 Java 版本

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:52:57 26 4
gpt4 key购买 nike

我最近将我的一个项目发布到 Spring 4.0.0.RELEASE

将项目部署到暂存环境后,我发现了一个异常并显示以下消息:偏移量 = 6 处的主要版本错误。我的假设是,Sping 4 不能与 Java 6 一起工作(我被迫这样做,因为我无法在系统上更改它)

(其实我都不知道,一个JAR是依赖Java版本的)

最佳答案

Christian Rockrohr My assumption is, that Sping 4 is not working with Java 6

这是错误的假设。

Spring requires JVM 1.6 or higher, as of Spring 4.0. *****

Java 8 (as well as 6 and 7)

Spring remains compatible with older versions of Java and the JDK: Concretely, Java SE 6 (specifically, a minimum level equivalent to JDK 6 update 10, as released in late 2008) and above are still fully supported. However, for newly started development projects based on Spring 4, we recommend the use of Java 7 or 8.

另请阅读:

这看起来像是使用 JDK 1.5 运行 Spring 4 应用程序。

确认:

Christian Rockrohr: Indeet, there is Java 1.5 installed on my AS400, it is not Java 1.6. That's is the reason, why Spring did not work. I just returned to Spring 3.1.0.RELEASE and it worked.

*****) http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/JdkVersion.html

关于java - 哪个是 Spring 4 支持的最低 Java 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21120437/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com