Spring Assignments
Spring Assignments
Assignment 1:
NOTE : Configure Bean with XML file.
Create a Bean class with properties of
• Student ID
• Student Name
• Map of Subjects and marks.
TASK 1:
Assignment 2:
Create a Bean of Address with Properties of.
▪ City
▪ State
▪ Pincode
Create a Bean of Organization with Properties of.
• Organization name
• Address of Organization <Bean of Above Address>
Create a Bean of Employee with Properties of.
▪ Employee Name
▪ Employee Id
▪ Employee Salary
▪ Address of Employee <Bean of Above Address>
▪ Organization of Employee <Bean of Above Organization >
• City
• State
• Pincode
Create a Bean of Organization with Properties of.
• Organization name
• Address of Organization <Bean of Above Address>
Create a Bean of Employee with Properties of.
• Employee Name
• Employee Id
• Employee Salary
▪ Address of Employee <Bean of Above Address>
▪ Organization of Employee <Bean of Above Organization >
NOTE : Configure Beans with XML file.
TASK 1:
Now Configure above three beans with default values as followed below.
Assignment 4:
NOTE : Configure Bean with Annotations. NO XML configurations.
Create a Bean class with properties of
• Student ID
• Student Name
• Map of Subjects and marks.
TASK 1:
• Create one Bean Configuration with Configuration class and Bean method.
• Create another Bean Configuration with component and component scans.
• Get Both Bean configuration Objects and print Details
Assignment 5:
Create a Bean of Address with Properties of.
▪ City
▪ State
▪ Pincode
Create a Bean of Organization with Properties of.
• Organization name
• Address of Organization <Bean of Above Address>
Create a Bean of Employee with Properties of.
▪ Employee Name
▪ Employee Id
▪ Employee Salary
▪ Address of Employee <Bean of Above Address>
▪ Organization of Employee <Bean of Above Organization >
NOTE : Configure Bean with Annotations. NO XML configurations.
TASK 1 : Now Create an application with Setter injection of all above dependencies
TASK 2 : Now Create another application with constructor injection of all above
dependencies
• Organization name
• Address of Organization <Bean of Above Address>
Create a Bean of Employee with Properties of.
▪ Employee Name
▪ Employee Id
▪ Employee Salary
▪ Address of Employee <Bean of Above Address>
▪ Organization of Employee <Bean of Above Organization >
• Organization name
• Address of Organization <Bean of Above Address>
Create a Bean of Employee with Properties of.
▪ Employee Name
▪ Employee Id
▪ Employee Salary
▪ Address of Employee <Bean of Above Address>
▪ Organization of Employee <Bean of Above Organization >
• Organization name
• Address of Organization <Bean of Above Address>
Create a Bean of Employee with Properties of.
▪ Employee Name
▪ Employee Id
▪ Employee Salary
▪ Address of Employee <Bean of Above Address>
▪ Organization of Employee <Bean of Above Organization >
➢ If User Clicks on Register, Display Below Form and ask User to Enter Details.
➢ If User Clicks on Login, Display Below Form and ask User to Enter Login Details.
Assignment 2:
NOTE: Create application with JPA module for database operations.
Define REST services for below Requirements:
1. Create Single Order with below information. Please follow below JSON syntax
{
Order Id : Integer
Amount : Double
No Of Items : Integer
Items : String array []
Order status : String
Payment status :
User : {
Requirements :
• Validate Request Body, like all properties are available in API payload and
validate mandatory fields as well. – Not required
• If Order Id is available, then Response should be with valid Status code
and Meaningful message.
• If Order Id is not available, then Order should be created and Response
should be with valid Status code and Meaningful message.
2. Update Order with below information. Please follow below JSON syntax
{
Amount : Double
No Of Items : Integer
Items : String array []
Order status : Success/Failure
Payment status : Success/Failure
User : {
Email id:
Name :
Contact:
City :
Area :
}
Requirements :
Requirements :
NOTE: Please use Response Status codes respectively.
Requirements :
NOTE: Please use Response Status codes respectively.