Вызвана: org.springframework.beans.factory.UnsatisfiedDependencyException: ошибка создания bean-компонента с именем «cidAuthClient» определено в URL [jar:nested:/service.jar/!BOOT-INF/classes/!/lk/dialog/mydialog/auth/externals/webclients/mife/CidAuthClient.class]: неудовлетворительная зависимость, выраженная через параметр конструктора 0: ошибка создание bean-компонента с именем mifeAdaptor, определенным в URL-адресе [jar:nested:/service.jar/!BOOT-INF/classes/!/lk/dialog/mydialog/auth/externals/webclients/mife/common/MifeAdaptor.class]: Неудовлетворительная зависимость, выраженная через параметр конструктора 0: ошибка создания bean-компонента с именем «webClient», определенным в ресурсе пути к классу [lk/dialog/mydialog/auth/application/config/Beans.class]: не удалось создать экземпляр [org.springframework.web.reactive .function.client.WebClient]: фабричный метод «webClient» выдал исключение с сообщением: io/netty/handler/codec/DefaultHeaders$ValueValidator
ниже мой файл pom.xml
Код: Выделить всё
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
3.3.4
lk.dialog.mydialog
authservice
1.1.0
authservice
Mydialog Auth Service
17
1.4.12
2020.0.2
2.15.0
2.1.9.RELEASE
org.springframework.boot
spring-boot-starter-validation
org.springframework.boot
spring-boot-starter-actuator
org.springframework.boot
spring-boot-starter-webflux
org.projectlombok
lombok
1.18.26
true
org.springframework.boot
spring-boot-starter-test
test
org.junit.vintage
junit-vintage-engine
junit
junit
io.projectreactor
reactor-test
test
junit
junit
test
org.jetbrains
annotations
24.0.1
compile
io.micrometer
micrometer-core
io.micrometer
micrometer-registry-prometheus
io.jsonwebtoken
jjwt
0.9.1
org.springframework.boot
spring-boot-starter-data-redis
org.springframework.cloud
spring-cloud-contract-wiremock
3.1.1
test
org.springframework.cloud
spring-cloud-starter-contract-stub-runner
3.1.1
test
com.toomuchcoding.jsonassert
jsonassert
org.skyscreamer
jsonassert
org.springframework.cloud
spring-cloud-starter-sleuth
org.json
json
20231013
org.modelmapper
modelmapper
3.1.1
org.apache.commons
commons-lang3
3.12.0
org.springframework.kafka
spring-kafka
com.google.code.gson
gson
2.11.0
jakarta.xml.bind
jakarta.xml.bind-api
2.3.3
org.glassfish.jaxb
jaxb-runtime
2.3.3
lk.dialog.crm
cache-connector
${cache-connector.version}
io.lettuce
lettuce-core
com.google.guava
guava
com.google.guava
guava
33.3.1-jre
io.lettuce
lettuce-core
io.lettuce
lettuce-core
6.1.6.RELEASE
io.netty
netty-codec
io.netty
netty-codec
4.1.72.Final
org.springframework.retry
spring-retry
org.springframework.cloud
spring-cloud-dependencies
${spring-cloud.version}
pom
import
org.springframework.boot
spring-boot-maven-plugin
repackage
org.apache.maven.plugins
maven-compiler-plugin
3.8.0
spring-milestones
Spring Milestones
https://repo.spring.io/milestone
deoployment
Nexus repo
http://localhost:8081/repository/maven-releases/
spring-milestones
Spring Milestones
https://repo.spring.io/milestone
maven-central
Central Repository
https://repo1.maven.org/maven2/
deployment
Internal Releases
http://localhost:8081/repository/maven-releases/
deployment
Internal Snapshot Releases
http://localhost:8081/repository/maven-snapshots/
Код: Выделить всё
@Bean
public WebClient webClient(WebClient.Builder webClientBuilder) {
ConnectionProvider provider =
ConnectionProvider.builder("customFixedConnectionPool")
.maxConnections(maxConnections)
.pendingAcquireTimeout(Duration.ofMillis(acquireTimeout))
.build();
HttpClient httpClient =
HttpClient.create(provider).resolver(DefaultAddressResolverGroup.INSTANCE);
return webClientBuilder
.clientConnector(new ReactorClientHttpConnector(httpClient))
.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
.build();
Код: Выделить всё
package lk.dialog.mydialog.auth.externals.webclients.mife.common;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;
@Configuration
public class MifeAdaptor {
private WebClient webClient;
private String mifeBaseUrlLive;
private String mifeBaseUrlStg;
private String mifeAppKeyLive;
private String mifeAppKeyStg;
private String mifeInitialAccessToken;
public MifeAdaptor(WebClient webClient,
@Value("${mifeBaseUrl}") String mifeBaseUrlStg,
@Value("${mifeAppKey}") String mifeAppKeyStg,
@Value("${mifeInitialAccessToken}") String accessToken,
@Value("${mifeLiveBaseUrl}") String mifeBaseUrlLive,
@Value("${mifeLiveAppKey}") String mifeLiveAppKey) {
this.webClient = webClient;
this.mifeBaseUrlStg = mifeBaseUrlStg;
this.mifeBaseUrlLive = mifeBaseUrlLive;
this.mifeAppKeyStg = mifeAppKeyStg;
this.mifeAppKeyLive = mifeLiveAppKey;
this.mifeInitialAccessToken = accessToken;
}
@Bean
public MifeAdaptorBase stg() {
return new MifeAdaptorBase(webClient, mifeBaseUrlStg, mifeAppKeyStg, mifeInitialAccessToken);
}
@Bean
public MifeAdaptorBase live() {
return new MifeAdaptorBase(webClient, mifeBaseUrlLive, mifeAppKeyLive, mifeInitialAccessToken);
}
Я не могу определить причину этой проблемы.
Если кто-нибудь знает причину и способ ее устранения, не мог бы вы мне очень поможете.
спасибо.
Подробнее здесь: https://stackoverflow.com/questions/791 ... faultheade
Мобильная версия