WebClient Maven ошибка зависимости?JAVA

Программисты JAVA общаются здесь
Anonymous
WebClient Maven ошибка зависимости?

Сообщение Anonymous »

У меня есть проект Mutli Module Maven, разделенный на следующие модули: Интернет, модель, настойчивость и сервис. Тем не менее, я получаю следующую ошибку при запуске проекта: < /p>

вызван: java.lang.classnotfoundexception: io.netty.channel.channelhandler
на java.base/jdk.internal.loader.builtinclassloader.loadclass (Builtinclassloader.java:641) ~ [na: na]
at hava.base/jdk.internal.loader.classloaders $ appclassloader.loadclass (classloaders.java:188) ~ [na: na]

Это не потому, что зависимость отсутствует, потому что она поставляется с зависимостью Webflux-Starter. У кого -нибудь есть идея? Заранее спасибо :) < /p>
Я настраиваю веб -клиент в своем собственном файле конфигурации, который я также ссылаюсь в файле моего приложения, чтобы он сканировался. < /P>
< P> Я показываю вам разные файлы здесь: < /p>
serviceImpl: < /p>
private final WebClient webClient;

public BerufesucheServiceImpl(@Qualifier("paWebClient") WebClient webClient) {
this.webClient = Objects.requireNonNull(webClient);
}
< /code>
configfile, где я настраиваю WebClient: < /p>
@Configuration
@ComponentScan(basePackages = {"de.mlp.pa.berufesuche.service.persistence"})
public class ServiceConfig {

@Bean("paWebClient")
public WebClient paWebClient() {
HttpClient httpClient = HttpClient.create()
.compress(true)
.doOnConnected(connection -> connection
.addHandlerFirst(new ReadTimeoutHandler(180000, TimeUnit.MILLISECONDS))
.addHandlerFirst(new WriteTimeoutHandler(180000, TimeUnit.MILLISECONDS)));

return WebClient.builder()
.baseUrl("http://localhost:8082/berufe-enricher")
.clientConnector(new ReactorClientHttpConnector(httpClient))
.build();
}
}
< /code>
POM из моего ServiceModule: < /p>

4.0.0

de.mlp.pa.berufesuche
berufesuche-parent
1.0.0-SNAPSHOT

berufesuche-service



de.mlp.pa.berufesuche
berufesuche-model




org.springframework.boot
spring-boot-starter-webflux




org.springframework
spring-context-support






< /code>
Parent-pom: < /p>


4.0.0

de.mlp.pa.berufesuche
berufesuche-parent
1.0.0-SNAPSHOT
pom


berufesuche-web
berufesuche-persistence
berufesuche-model
berufesuche-service




21
UTF-8


3.4.2


3.13.0
3.4.0
3.3.1
3.5.2
3.8.1
10.0.4






de.mlp.pa.berufesuche
berufesuche-web
${project.version}


de.mlp.pa.berufesuche
berufesuche-persistence
${project.version}


de.mlp.pa.berufesuche
berufesuche-model
${project.version}


de.mlp.pa.berufesuche
berufesuche-service
${project.version}




org.springframework.boot
spring-boot-dependencies
${springboot.version}
pom
import








org.springframework.boot
spring-boot-starter-test
test







org.apache.maven.plugins
maven-source-plugin
${maven-source-plugin.version}


attach-sources
verify

jar-no-fork





org.apache.maven.plugins
maven-clean-plugin
${maven-clean-plugin.version}



src/main/generated/

*






org.springframework.boot
spring-boot-maven-plugin
${springboot.version}



repackage


spring-boot





org.apache.maven.plugins
maven-dependency-plugin
${maven-dependency-plugin.version}



properties





org.apache.maven.plugins
maven-surefire-plugin
${maven-surefire-plugin-version}


**/*Test.java
**/*IT.java



@{argLine} -Xms1G -Xmx4G -javaagent:${org.mockito:mockito-core:jar}




org.owasp
dependency-check-maven
${dependency-check-maven.version}



check








org.apache.maven.plugins
maven-clean-plugin


org.apache.maven.plugins
maven-compiler-plugin


org.jacoco
jacoco-maven-plugin


org.apache.maven.plugins
maven-dependency-plugin


org.apache.maven.plugins
maven-surefire-plugin






OWASP



org.owasp
dependency-check-maven







< /code>
ApplicationFile, где я импортирую Ther ConfigFile: < /p>
@SpringBootApplication
@Import(value = {
PersistenceConfig.class,
ServiceConfig.class,
WebConfig.class,
})
public class BerufesucheApplication {

public static void main(String[] args) {
SpringApplication.run(BerufesucheApplication.class, args);
}

}



Подробнее здесь: https://stackoverflow.com/questions/794 ... ncy-errors

Вернуться в «JAVA»