-
Notifications
You must be signed in to change notification settings - Fork 308
Do Rick and Morty Task #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
pom.xml
Outdated
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
|
||
<!-- For Web controllers --> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 😎
No description provided.