Learn

Congratulations! You can now wield the power of custom JPA queries! Let’s do a brief review:

  • We can add custom filter queries to our extension of the CrudRepository simply by adding a properly formatted method name to the interface
  • We do not need to write the method bodies
  • The rules for defining custom queries is in the Spring documentation
  • We can create advanced query logic by adding phrases such as And and LessThan into the method name

Instructions

The complete set of custom queries we wrote for PlantRepository is included here.

Make sure you can explain what each one does before moving on!

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?