Getting “reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response” while mocking a third part API

My Spring boot API is consuming a third part API using WebClient DemoAPIController @RestController public class DemoAPIController { @Autowired DemoService demoService; @GetMapping(“/mytest”) public Mono<UserType> getUserType() { return demoService.getUserType(); } } DemoService.java @Component public class DemoService { @Value(“${base.url}”) private String baseUrl; public Mono<UserType> getUserType() { System.out.println(“baseUrl:” + baseUrl); WebClient webClient = WebClient.builder().baseUrl(baseUrl) .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .defaultHeader(“apikey”, “test”).build();…

Why does this message keep appearing in my output? “(HTTPLog)-Static: isSBSettingEnabled false”

For this code: public static void main(String[] args) { Scanner sc = new Scanner(System.in).useDelimiter(“\n”); System.out.println(“Please enter text”); String input = sc.next(); System.out.println(“Your text: ” + input); } Without user input, I immediately get the output: Please enter text (HTTPLog)-Static: isSBSettingEnabled false (HTTPLog)-Static: isSBSettingEnabled false This text continues to appear in pairs in the output at…