gpt4 book ai didi

spring-security - Spring Security 支持 jdk8 吗?

转载 作者:行者123 更新时间:2023-12-04 07:10:45 25 4
gpt4 key购买 nike

Spring Security 是否与 Java 8 (Oracle) 兼容?

我认为 v4 是,因为它需要支持 jdk8 的 Spring v4。但是我找不到任何关于此的明确信息。我确实检查了 Spring Security Bug Tracker,发现了 OpenJdk8 的一个 Unresolved 小问题——但是它是在 Spring Security v4 发布之前编写的。

我在带有 jdk8 的 Spring Security v3.x 上找不到任何东西。有谁知道这是否有效/是否受支持?

最佳答案

Spring Security Reference 中有一段指出:

Spring Security 2.0.x requires a minimum JDK version of 1.4 [...]

Spring Security 3.0 and 3.1 require at least JDK 1.5 [...]

但是,正如问题中所指出的,这不是很明确!尽管是对 Spring Security 4.2.0 的引用,但上面引用的部分根本没有关于 Spring Security 4 的详细信息。我怀疑该部分文档已经过时了。

A different portion of the documentation有此信息(添加了强调):

There are a number of ways in which Spring Security can resolve the method arguments. [...] By default, the following options are tried for a method as a whole.

  • [...]
  • If JDK 8 was used to compile the source with the -parameters argument and Spring 4+ is being used, then the standard JDK reflection API is used to discover the parameter names. This works on both classes and interfaces.

虽然不明确,但记录 Spring Security 如何处理使用 JDK 8 编译的代码(如果它不能使用 JDK 8)似乎是不合逻辑的。

关于spring-security - Spring Security 支持 jdk8 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29668491/

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