Overview The purpose of this activity is to walk you through the process of working with Spring JPA for database access. This activity is based on the spring-jpa-intro project that was assigned to you using Github Classroom. Creating Flyway Migrations One of the requirements for these activities is to create Flyway migrations. The naming of migration files is a bit tricky, since they are applied in particular order. You may find it helpful to install the Flyway plugin for IntelliJ. This names the file using a long date string that guarantees that it will be sorted after the previous scripts. Activity Complete the following enhancements to the application. After each step, commit the change to Git by • selecting the project in Intellij • selecting Git/Commit Directory from the VCS menu, and • entering a comment and selecting to commit and push the code Step 1 • Create a Flyway SQL script that creates a Manager table in the database. This class should have the following structure: Field Data Type id integer first_namevarchar(24) last_name varchar(24) department varchar(24) • Run the application so that the Flyway script is executed. As an alternative, you can either • – open a terminal window and type “mvnflyway:migrate”, OR open the Maven window in IntelliJ, click the “M” button to bring up the command dialog, and enter “flyway:install” • Use the Persistence tool to create a class for the new table. • Commit and push your changes to Github using the commit message “completed step 1” Step 2 • Create an interface called ManagerRepositoryto provide CRUD operations for the Manager class. – Use the PersonRepositoryas a guide. Remember that this is a Java interface, not a class • Modify the main class to – create a Manager object, giving the manager your last name – save the object to the database using the ManagerRepository – override the Manager class toStringmethod so that it prints out “Manager: “, where of course and are the fields from the object – use the ManagerRepositoryto retrieve by last name and print out the manager that you just saved * this will require adding a findByLastNamemethod to the ManagerRepository(IntelliJ will give you possible method names) • As before, commit and push your changes to Github using the commit message “completed step 2” Turning in the Assignment Go to Github and click the “Clone” button and copy the git clone key that starts with “git” (not https). You may need to choose “ssh” in the window to get the correct key. Turn that key in to Blackboard. 2