Код: Выделить всё
@HttpExchange(accept = "application/json", contentType = "application/json")
public interface MyHttpExchange {
@GetExchange("/api/v1.0/question")
Mono question(@RequestParam MyQueryParameters myQueryParameters);
}
Код: Выделить всё
public record MyQueryParameters(int id, int name, int age) {
}
Код: Выделить всё
https://third-party.com/api/v1.0/question?id=1&name=11&age=111
Код: Выделить всё
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [@org.springframework.web.bind.annotation.RequestParam com.example.MyQueryParameters] to type [java.lang.String]
at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:294) ~[spring-core-6.2.3.jar:6.2.3]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ HTTP GET "..." [ExceptionHandlingWebHandler]
Original Stack Trace:
at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:294) ~[spring-core-6.2.3.jar:6.2.3]
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:185) ~[spring-core-6.2.3.jar:6.2.3]
at org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addSingleValue(AbstractNamedValueArgumentResolver.java:199) ~[spring-web-6.2.3.jar:6.2.3]
at org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addSingleOrMultipleValues(AbstractNamedValueArgumentResolver.java:179) ~[spring-web-6.2.3.jar:6.2.3]
at org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.resolve(AbstractNamedValueArgumentResolver.java:97) ~[spring-web-6.2.3.jar:6.2.3]
at org.springframework.web.service.invoker.HttpServiceMethod.applyArguments(HttpServiceMethod.java:142) ~[spring-web-6.2.3.jar:6.2.3]
at org.springframework.web.service.invoker.HttpServiceMethod.invoke(HttpServiceMethod.java:132) ~[spring-web-6.2.3.jar:6.2.3]
at org.springframework.web.service.invoker.HttpServiceProxyFactory$HttpServiceMethodInterceptor.invoke(HttpServiceProxyFactory.java:243) ~[spring-web-6.2.3.jar:6.2.3]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.2.3.jar:6.2.3]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223) ~[spring-aop-6.2.3.jar:6.2.3]
at jdk.proxy2/jdk.proxy2.$Proxy52.question(Unknown Source) ~[na:na]
Подробнее здесь: https://stackoverflow.com/questions/794 ... ation-requ
Мобильная версия