0% found this document useful (0 votes)
7 views2 pages

Java Spring Boot Test

This document outlines a Java with Spring Boot test consisting of three sections: multiple-choice questions, short answer questions, and coding tasks. Section A covers core concepts of Java and Spring Boot, Section B includes questions on Spring Boot features and principles, and Section C involves practical coding tasks to create REST APIs for student management, product CRUD operations, and a simple login API. There is also an optional bonus question regarding the request flow in Spring Boot.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Java Spring Boot Test

This document outlines a Java with Spring Boot test consisting of three sections: multiple-choice questions, short answer questions, and coding tasks. Section A covers core concepts of Java and Spring Boot, Section B includes questions on Spring Boot features and principles, and Section C involves practical coding tasks to create REST APIs for student management, product CRUD operations, and a simple login API. There is also an optional bonus question regarding the request flow in Spring Boot.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java with Spring Boot Test

Total Time: 2 Hours


Total Marks: 100

Section A – Core Java & Spring Boot MCQ (20 Marks)


• 1. Which annotation is used to mark a class as a Spring Boot Application?
• 2. Which dependency is required to create REST APIs in Spring Boot?
• 3. What does @Autowired do?
• 4. Which annotation is used to create REST API methods?
• 5. Which layer communicates directly with database?
• 6. Spring Boot is built on which framework?
• 7. Which annotation converts Java object to JSON response?
• 8. What does Spring Boot Starter do?
• 9. Which file contains application configuration in Spring Boot?
• 10. Which tool is commonly used for dependency management?

Section B – Short Answer Questions (30 Marks)


• What is Spring Boot and why is it used?
• Difference between @Controller and @RestController.
• What is Dependency Injection in Spring Boot?
• Explain Spring Boot Auto Configuration.
• What is Spring Data JPA?
• What is the use of [Link] file?
• Explain Spring Boot Starter Web.
• What is REST API?
• Difference between GET and POST request.
• What is Bean in Spring Framework?

Section C – Machine Round (Coding Tasks) – 50 Marks

Task 1 – Student Management REST API (20 Marks)


Create a Spring Boot application that manages student records with fields: id, name, email, course.
APIs: POST /students, GET /students, GET /students/{id}, DELETE /students/{id}

Task 2 – Product CRUD API (15 Marks)


Create Product API with fields: id, name, price, category.
APIs: Add product, Update product, Get all products, Delete product using Spring Data JPA.

Task 3 – Simple Login API (15 Marks)


Create login API with fields: id, username, password.
Endpoint: POST /login. Return Login Success if credentials match database otherwise Invalid
Credentials.
Bonus Question (Optional – 10 Marks)
Explain the flow of a Spring Boot request from Controller → Service → Repository → Database.

You might also like