Skip to content

finished task #171

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

Closed
wants to merge 11 commits into from
Closed

finished task #171

wants to merge 11 commits into from

Conversation

Dima23-ops5
Copy link

No description provided.

Copy link

@sarakhmen sarakhmen left a comment

Choose a reason for hiding this comment

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

let's improve your solution :)

.gitignore Outdated
Comment on lines 21 to 23
src/main/resources/application.properties
src/main/resources/liqubase.properties
test/resources/application.properties

Choose a reason for hiding this comment

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

why did you add these files to gitignore?

Comment on lines 1 to 9
[2024/07/02 23:35:23.941, java.exe (PID: 12988, TID: 13520), JavaEnvironment.cpp:502 (JavaEnvironment::detect)]
TRACE: Entering JavaEnvironment::detect
[2024/07/02 23:35:23.952, java.exe (PID: 12988, TID: 13520), JavaEnvironment.cpp:519 (JavaEnvironment::detect)]
TRACE: Installed Java detected: version=; arch=64; productCode={701CE19D-1741-5258-9CD3-D5DDD1A6DEDE}; type=1
[2024/07/02 23:35:23.952, java.exe (PID: 12988, TID: 13520), JavaEnvironment.cpp:135 (`anonymous-namespace'::detectHomeDir)]
TRACE: Find home dir of {701CE19D-1741-5258-9CD3-D5DDD1A6DEDE} Java installation
[2024/07/02 23:35:23.954, java.exe (PID: 12988, TID: 13520), JavaEnvironment.cpp:302 (`anonymous-namespace'::detectFullVersion)]
TRACE: Detect full version of {701CE19D-1741-5258-9CD3-D5DDD1A6DEDE} Java installation
[2024/07/02 23:35:23.955, java.exe (PID: 12988, TID: 13520), JavaEnvironment.cpp:213 (`anonymous-namespace'::detectFullVersionFromMsi)]

Choose a reason for hiding this comment

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

please remove mvm/appdata/local/temp files from git

@Component
@AllArgsConstructor
public class CharactersClientImpl implements CharactersClient {
private static final String BASE_URL = "https://rickandmortyapi.com/api";

Choose a reason for hiding this comment

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

Let's move this url to the config files (application.properties) instead of hardcoding it

@Dima23-ops5 Dima23-ops5 requested a review from sarakhmen July 7, 2024 11:33
.map(charactersMapper::toDto)
.toList();
}

Copy link

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 30 to 32
return charactersRepository.findAllByName(name).stream()
.map(charactersMapper::toDto)
.toList();
Copy link

Choose a reason for hiding this comment

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

FYI mapstruct suppports mapping of list to list, you just need to declare it

@Override
public CharactersResponseDto getRandomCharacter() {
Random random = new Random();
Long randomId = random.nextLong(
Copy link

Choose a reason for hiding this comment

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

make random a class field to avoid recreation per each method invocation

import lombok.NoArgsConstructor;

@Entity
@Data
Copy link

Choose a reason for hiding this comment

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

don't use Lombok's Data on JPA Entity

@Dima23-ops5 Dima23-ops5 requested a review from okuzan July 9, 2024 09:04
@Dima23-ops5 Dima23-ops5 closed this by deleting the head repository Feb 23, 2025
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