I am doing a Java / Spring course. Here is the code:
package com.pinodev.helloServer;
import reactor.netty.http.server.HttpServer;
public class HelloServerApplication {
public static void main(String[] args) {
HttpServer server = HttpServer.create("localhost",8080);
}
}
build.gradle:
plugins {
id 'org.springframework.boot' version '2.4.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.pinodev'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webflux'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
}
test {
useJUnitPlatform()
}
This is where the error occurs
error: 'create()' in 'reactor.netty.http.server.HttpServer' cannot be applied to '(java.lang.String, int)'
