I'm trying to figure out the Spring way of doing things as I'm new to the platform. I have a repository declared as follow:
public interface ScreenshotRepository extends JpaRepository<Screenshot, UUID>
I have a few query methods in there, but now I want to have another method that is not just a query. The method runs a query and if a record is found, it returns it, if not, it creates it with some default parameters. Where should this method go?
I saw custom repository implementations on the documentation, but because they are separate from the actual JpaRepository
they don't seem to have access to the database.