Skip to content

Conversation

yurlis
Copy link

@yurlis yurlis commented Oct 13, 2024

No description provided.

pom.xml Outdated
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

<!-- For Web controllers -->

Choose a reason for hiding this comment

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

remove comments and commented code

Copy link
Author

Choose a reason for hiding this comment

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

Okay! I specifically made comments for future projects because adding or incorrectly adding dependencies makes strange mistakes. It's easy to correctly add a dependency to a new project by looking at the training project. I'll save a copy to my local storage.

@Service
@RequiredArgsConstructor
public class CharacterServiceImpl implements CharacterService {
private static final String RICK_AND_MORTY_API_URL = "https://rickandmortyapi.com/api/character";

Choose a reason for hiding this comment

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

you can store this value in application proprties and get from it by using @Value

}

@Override
public void syncCharactersFromExternalApi() {

Choose a reason for hiding this comment

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

it's better to replace this logic to CharacterClient service for example

Copy link
Author

Choose a reason for hiding this comment

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

No problem . I wanted to emphasise for those watching the project that there is an initialisation phase. That's why I did it.

…ue to get the Api Url value from the application.properties file. Move the logic of getting the initial data to the CharacterInitializeClient service class.
@yurlis yurlis requested a review from Elena-Bruyako October 14, 2024 13:53
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.

Awesome 😎

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.

3 participants