Skip to content

Exercise submission#5

Open
kostaslei wants to merge 1 commit intoih-java-08-25:mainfrom
kostaslei:main
Open

Exercise submission#5
kostaslei wants to merge 1 commit intoih-java-08-25:mainfrom
kostaslei:main

Conversation

@kostaslei
Copy link

No description provided.

import java.util.Optional;

@RestController
@RequestMapping("/customer")
Copy link
Contributor

Choose a reason for hiding this comment

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

better to use customers and generally the name of the resource as plurals in the path

this.customerService = customerService;
}

@GetMapping("/all")
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to use /all it should be only /customers

@Repository
public interface CustomerRepository extends JpaRepository<Customer, Long> {
Optional<Customer> findById(Integer id);
Optional<Customer> findByLastName(String lastName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing some custom jpql and native queries

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