Question: Create a database having as a name Practical using PHPMYADMIN. Create a Spring Starter Project with the name Practical . Add the appropriate dependencies (Spring
- Create a database having as a name Practical using PHPMYADMIN.
- Create a Spring Starter Project with the name Practical.
- Add the appropriate dependencies (Spring Web, Spring JPA and MySQL)
- Add these parameters to your application.properties file.
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/practical?serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
- Create the 2 model classes (
). Make the best choice for the properties datatype. The Entity1 (Line1) is related to many objects of Entity2 (Line2)Ministry
MinistryId
MinistryName
MinisterName
Hospital
HospitalId
HospitalName
Address
- Create an interface for each model to implement the CrudRepository services.
- Execute the project and Add some records to the generated tables using PHPMYADMIN.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
