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:
Does anybody have any idea why WebClient
remains unresolved?
I've tried all 4 of these dependency declerations, and none work:
compile 'org.springframework.boot:spring-boot-starter-webflux'
compile group: 'org.springframework', name: 'spring-webflux', version: '5.2.7.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation group: 'org.springframework', name: 'spring-webflux', version: '5.2.7.RELEASE'