WebClient not resolving
In order to utilise the new `WebClient` API, I've included `spring-webflux` in my Intellij project.
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-webflux'
// compile group: 'org.springframework', name: 'spring-webflux', version: '5.2.7.RELEASE'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
However, WebClient remains unresolved:
C:\Users\tobia\Documents\spring-app\service\Service.java:25: error: cannot find symbol
System.out.println(WebClient.Builder());
^
symbol: variable WebClient
location: class Service
---
The dependency itself seems to have resolved, as `webflux` is now in my "external libraries" list:
https://i.stack.imgur.com/h1swN.png
---
Does anybody have any idea why `WebClient` remains unresolved?
请先登录再写评论。
What's the full package name of the WebClient class? Which jar in your project dependencies contains this class?
@sergebaranov [org.springframework.web.reactive.function.client](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/reactive/function/client/WebClient.html)
Answered at https://stackoverflow.com/a/62480031/104891 .
The issue is not IntelliJ IDEA related.