Question: You are given a spring boot application (version 2.0.5) with spring-boot-starter-data-jpa module included. Database access is fully configured.The database contains table person_data with columns: id
You are given a spring boot application (version 2.0.5) with spring-boot-starter-data-jpa module included. Database access is fully configured.The database contains table "person_data" with columns:
id (bigint)
first_name (varchar)
last_name (varchar)
All columns are not nullable
Tasks
Use annotations to configure Person class as hibernate entity that corresponds to table "person_data" Implement method getFulIName in Person class, so that it would return full name for given entity. For example: "John Smith" (when first_ name=John, last_name=Smith) Register PersonService class as spring bean Implement method findAll in PersonService. It should return all entities from database
Requirements
Names of classes Person and Person Service cannot be changed Sequence is not available Make sure to use proper types for fields eg. Person id should not be int
Hints
Do not use @GeneratedValue for id field eId will be enough.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
