Created
January 2, 2019 22:02
-
-
Save must1/3382776017af2b080c8e3e45d71c6adc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface AccountRepository { | |
Account findById(Id id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MySQLAccountRepository implements AccountRepository { | |
private CrudRepository<Account, Integer> repository; | |
// tutaj konstruktor | |
public Account findById(Id id) { | |
return this.repository.findById(id); // czy jak tam ta metoda się nazywa | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment