In which database JpaRepository uses by default?

When we using methods that come from JpaRepository like save, in which database spring boot use?
and how can we change the default database if necessary?

// Interface
public interface FooRepository
    extends JpaRepository<Department, Long> {

>Solution :

It uses the database which you have configured in your properties file. You can change the database using the following properties(MySQL example):


Leave a Reply