Practical of Lucent Innovation Interview Process.
The project is created with Maven, so you just need to import it to your IDE and build the project to resolve the dependencies
Note : please find sql file and import it in MySQL Workbench
Create a MySQL database 'lucentinterview' and set username and password it. also add the credentials to /resources/application.properties.
Like this :
server.port=2020
#JSP
spring.mvc.view.prefix: /WEB-INF/jsp/
spring.mvc.view.suffix: .jsp
#MySQL
spring.datasource.url=jdbc:mysql://localhost:3306/lucentinterview?useSSL=false
spring.datasource.username=umang
spring.datasource.password=umang
spring.jpa.hibernate.ddl-auto=update
Run the project through the IDE and head out to http://localhost:2020/
Expose API for Customer Details store into the database (1 hour) Customer Details Fields
- Name
- Gender
- Email Address
- Mobile No
- Address Line 1
- Address Line 2
- State
- City
- ZipCode
- Country
● Create a new customer
● Update customer details
● Deleting customer
● Get all customer details
Mapping : POST Mapping.
Url : http://localhost:2020/customer/add
{
"name":"Umang",
"gender":"Male",
"emailAddress":"Umang@gmail.com",
"mobileNo":"09090909909",
"address1":"Address a ",
"address2":"Address b",
"city":"AHMEDABAD",
"state":"GUJARAT",
"zipCode":"ASAy566",
"country":"INDIA"
}
Mapping : PUT Mapping.
Url : http://localhost:2020/customer/update/{customerId}
{
"name":"UPDATED NAME",
"gender":"Male",
"emailAddress":"Umang@gmail.com",
"mobileNo":"09090909909",
"address1":"Address a ",
"address2":"Address b",
"city":"AHMEDABAD",
"state":"GUJARAT",
"zipCode":"ASAy566",
"country":"INDIA"
}
Mapping : DELETE Mapping.
Url : http://localhost:2020/customer/delete/{customerId}
Mapping : GET Mapping.
Url : http://localhost:2020/customer/getAll
Implement API to perform the following operations.
● Create a Customer Form + using above API
● Update Customer details using Form + using above API
● Display customer List into the table using above API
Note : Open Task 2 all urls in Web browser
Url : http://localhost:2020/registration
Url : http://localhost:2020/list
You can edit customer clicking edit
Url : http://localhost:2020/list
To get all products data from using below API and store into the database:
● Retrieve all product data
● Display products into frontside (table)
Note : Open Task 3 all urls in Web browser
get json response of above url then save the data into table 'products'
Note : please find sql file and import it in MySQL Workbench