Skip to content

Conversation

@Gabrielle-Santiago
Copy link

CRUD creation of comments with pagination

# Conflicts:
#	src/main/java/com/huseynovvusal/springblogapi/controller/AuthenticationController.java
@huseynovvusal huseynovvusal self-requested a review August 29, 2025 06:28
Copy link
Owner

@huseynovvusal huseynovvusal left a comment

Choose a reason for hiding this comment

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

Overall, appreciate your effort. After making proposed changes resubmit your work. Please, also make sure that you are working the latest version of this project.

.authorizeHttpRequests(
req -> req
.requestMatchers("/api/auth/**")
.requestMatchers("/api/**")
Copy link
Owner

Choose a reason for hiding this comment

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

What is the purpose here?

private final AuthenticationService authenticationService;

@PostMapping("register")
@PostMapping("/api/auth/register")
Copy link
Owner

Choose a reason for hiding this comment

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

Why you changed back to this pattern? We already have RequestMapping.

@RestController
@RequestMapping("/api/comments")
public class CommentController {
@Autowired
Copy link
Owner

Choose a reason for hiding this comment

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

Recommend using constructor injection (e.g., with Lombok's @RequiredArgsConstructor) instead of field injection using @Autowired. It is preferred option for testing.

@Gabrielle-Santiago
Copy link
Author

Gabrielle-Santiago commented Aug 29, 2025 via email

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