Skip to content

Commit

Permalink
Adding declaration as repository component & changing primary key type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludy87 committed Jul 14, 2024
1 parent 5751b1a commit ba1cca2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import stirling.software.SPDF.model.Authority;

@Repository
public interface AuthorityRepository extends JpaRepository<Authority, Long> {
// Set<Authority> findByUsername(String username);
Set<Authority> findByUser_Username(String username);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package stirling.software.SPDF.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.web.bind.annotation.ResponseBody;

import stirling.software.SPDF.model.PersistentLogin;

@ResponseBody
public interface PersistentLoginRepository extends JpaRepository<PersistentLogin, String> {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import stirling.software.SPDF.model.User;

public interface UserRepository extends JpaRepository<User, String> {
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
Optional<User> findByUsernameIgnoreCase(String username);

Optional<User> findByUsername(String username);
Expand Down

0 comments on commit ba1cca2

Please sign in to comment.