Changeset ae042f4 for src/main/java/com/example/autopartz/service
- Timestamp:
- 01/04/23 02:49:26 (23 months ago)
- Branches:
- main
- Children:
- ab952ab
- Parents:
- 6832924
- Location:
- src/main/java/com/example/autopartz/service
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/service/LoginService.java
r6832924 rae042f4 6 6 User register(String name, String username, String email, String number, String password); 7 7 User login(String username, String password); 8 // User findByUsername(String username);9 10 8 } -
src/main/java/com/example/autopartz/service/PartService.java
r6832924 rae042f4 7 7 public interface PartService { 8 8 List<Part> findAll(); 9 Part findById( Longid);9 Part findById(Integer id); 10 10 } -
src/main/java/com/example/autopartz/service/UserService.java
r6832924 rae042f4 7 7 public interface UserService { 8 8 List<User> findAllUsers(); 9 User findByUsername(String username); 10 9 11 } -
src/main/java/com/example/autopartz/service/impl/PartServiceImpl.java
r6832924 rae042f4 22 22 23 23 @Override 24 public Part findById( Longid) {24 public Part findById(Integer id) { 25 25 return partRepository.findById(id).orElseThrow(RuntimeException::new); 26 26 } -
src/main/java/com/example/autopartz/service/impl/UserServiceImpl.java
r6832924 rae042f4 20 20 return userRepository.findAll(); 21 21 } 22 23 @Override 24 public User findByUsername(String username) { 25 return userRepository.findAllByUsername(username).stream().findFirst().orElseThrow(RuntimeException::new); 26 } 22 27 }
Note:
See TracChangeset
for help on using the changeset viewer.