Skip to content

Conversation

Litvynets
Copy link

No description provided.

Copy link

@liliia-ponomarenko liliia-ponomarenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! A few minor comments ;)

Comment on lines +10 to +15
@AllArgsConstructor
@Component
public class RickAndMortyService {
private static final String API_URL = "https://rickandmortyapi.com/api/character";
private Client<RickAndMortyApiResponseDataDto> client;
private CharacterService characterService;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@AllArgsConstructor
@Component
public class RickAndMortyService {
private static final String API_URL = "https://rickandmortyapi.com/api/character";
private Client<RickAndMortyApiResponseDataDto> client;
private CharacterService characterService;
@RequiredArgsConstructor
@Component
public class RickAndMortyService {
private static final String API_URL = "https://rickandmortyapi.com/api/character";
private final Client<RickAndMortyApiResponseDataDto> client;
private final CharacterService characterService;

client.setUrl(dataFromApi.info().next());
characterService.addListCharacter(dataFromApi.results());
}
System.out.println("The database is successfully updated...");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to log something use Slf4j from Lombok instead of printing to console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants