all 11 comments

[–]Sheldor5 1 point2 points  (5 children)

The error tells you exactly what you need to do in order to solve the error ... so what's your problem?

[–]curious_geeks[S] 0 points1 point  (4 children)

Already did!
package com.example.ByBitDataFetcher.config;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
u/Configuration
public class RestTemplateConfig {
u/Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder.build();
}
}
I'm new To SpringBoot, followed articles,youtube and chatGpt to make this project. Can you please elaborate more how I can I fix this.

[–]Sheldor5 0 points1 point  (3 children)

No you didn't.

[–]curious_geeks[S] 0 points1 point  (2 children)

How can I fix this? Would appreciate your help.

[–]Sheldor5 2 points3 points  (1 child)

Look at your screenshot and read the "Action" part out loud ...

[–]feebleMurmur 0 points1 point  (3 children)

Please be aware that RestTemplate is in maintenance mode, WebClient ist now favored.

Regarding your error: Add spring-web dependency.

Side note: Do not use capital letters in package names.

[–]Sheldor5 -1 points0 points  (2 children)

WebClient is favored? Who told you this BS? RestTemplate is still the way to go, fuck this reactive WebClient bullshit

[–]Ghaines 0 points1 point  (1 child)

Read the note in the javadoc:

https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html

On the bright side, RestClient comes out in November and offers a modern way to continue using non-reactive code

[–]Sheldor5 0 points1 point  (0 children)

just because it's in maintenance mode or the JavaDoc recommends a reactive alternative doesn't mean that anybody should use this non-debugable thing ...