gpt4 book ai didi

spring - Websphere 8.5 与 Spring-5

转载 作者:行者123 更新时间:2023-12-02 02:25:58 25 4
gpt4 key购买 nike

Websphere 8.5.5 与 Spring 5 兼容吗? spring5 (validation-api 5) 中引用的 Validation API 导致 MethodNotFound 异常。是否有任何指针/补丁可以解决此问题 - 无需升级到 Websphere 9?

Caused by: java.lang.NoSuchMethodError: javax/validation/Configuration.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider; (loaded from file:/opt/IBM/WebSphere/AppServer/plugins/javax.j2ee.validation.jar by org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@25d460de) called from class org.springframework.validation.beanvalidation.LocalValidatorFactoryBean (loaded from file:../spring-context-5.0.2.RELEASE.jar by com.ibm.ws.classloader.CompoundClassLoader@1c7dbdd9

最佳答案

方法javax/validation/Configuration.getDefaultParameterNameProvider是在Bean Validation 1.1中添加的,因此这表明您正在使用的Spring Validator正在尝试使用Bean Validation 1.1 API。根据https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.html :

As of Spring 5.0, this class requires Bean Validation 1.1+

WebSphere 8.5.5 提供了 Bean Validation 1.0,直到版本 9.0 才添加对 Bean Validation 1.1 的支持。因此,您需要使用 Spring 4.x 或 WebSphere 9.x。

关于spring - Websphere 8.5 与 Spring-5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48156126/

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