Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

LO2 Compare three types of individual incentives.

Answered: 1 week ago