Unit 5 Assignment
Unit 5 Assignment
11. What is Spring Boot Actuator, and why is it useful in monitoring and managing
applications?
12. How do you enable and configure Actuator endpoints in a Spring Boot application?
13. Describe the use of Actuator endpoints like /health, /info, and /metrics.
14. How can you secure Actuator endpoints to restrict access in a production
environment?
15. Spring Boot Build Systems:
16. Compare Maven and Gradle as build systems for Spring Boot projects.
17. Create a new Spring Boot project using Maven or Gradle.
18. What is the purpose of the pom.xml file in a Maven-based Spring Boot project?
19. Explain the benefits of build systems for dependency management and project
structure.
20. Spring Boot Code Structure:
21. Describe the recommended project structure for a Spring Boot application.
22. How does Spring Boot manage package structures and component scanning?
23. Provide examples of different package types commonly used in Spring Boot projects.
24. What is the role of the main application class in a Spring Boot project?
25. Spring Boot Runners:
26. Explain the concept of Spring Boot runners and their role in application startup.
27. Create a custom runner in a Spring Boot application using the CommandLineRunner
or ApplicationRunner interface.
28. How can you use runners to perform initialization or data loading tasks at startup?
29. Discuss the order of execution for multiple runners in a Spring Boot application.
30. Logger in Spring Boot:
36. Define REST (Representational State Transfer) and its principles in web services.
37. How does Spring Boot support the development of RESTful web services?
38. Create a simple Spring Boot REST controller that handles HTTP GET requests.
39. Explain the purpose of returning data in different formats (e.g., JSON) in RESTful
services.
40. REST Controller Annotations:
41. List some common annotations used in Spring Boot REST controllers.
42. How do you map HTTP requests to controller methods using the @RequestMapping
annotation?
43. Explain the use of @PathVariable to capture URL path parameters in RESTful services.
44. What is the role of the @RequestParam annotation for handling query parameters in
Spring Boot controllers?
45. HTTP Methods in RESTful APIs:
46. Describe the standard HTTP methods (GET, POST, PUT, DELETE) and their significance
in REST.
47. Create Spring Boot REST endpoints for each of the HTTP methods to perform various
operations.
48. How can you use the @PostMapping and @PutMapping annotations for request
handling?
49. Discuss the idempotence of HTTP methods and its impact on RESTful services.
50. Build Web Applications with Spring Boot:
51. Explain how Spring Boot supports the development of web applications.
52. Describe the use of the @Controller annotation in Spring Boot for creating web
controllers.
53. Provide an example of a Spring Boot controller that serves web pages.
54. How can you configure view resolvers and templates for web applications in Spring
Boot?
55. Explain the role of Spring Boot Data in simplifying data access in Spring Boot
applications.
56. How do you configure a data source for database access in a Spring Boot application?
57. Create a Spring Boot repository for a specific entity and perform CRUD (Create, Read,
Update, Delete) operations.
58. Discuss the benefits of using Spring Data JPA for data access in Spring Boot.
59. Spring Boot Security:
60.
61. Describe the importance of security in web applications and how Spring Boot
supports it.
62. Implement Spring Boot security configurations to enable basic authentication in a
web application.
63. How can you use Spring Security to secure specific endpoints or resources in a Spring
Boot application?
64. Explain the role of authentication providers and user details services in Spring Boot
security.
65. Spring Boot Microservices:
66.
67. Define microservices architecture and its advantages in modern application
development.
68. How does Spring Boot enable the development of microservices?
69. Create a simple Spring Boot microservice that exposes an API for other services to
consume.
70. Discuss the challenges and solutions related to communication between
microservices in Spring Boot.
71. Spring Boot Testing:
72.
73. Explain the importance of testing in Spring Boot applications.
74. How do you write unit tests for Spring Boot components using JUnit and Mockito?
75. Create an integration test for a Spring Boot REST API using the @SpringBootTest
annotation.
76. Discuss the concept of test profiles in Spring Boot and how they help with testing
variations.
77. Spring Boot Actuator Endpoints:
78.
79. List some commonly used Spring Boot Actuator endpoints.
80. What information does the /actuator/health endpoint provide, and how is it useful
for monitoring?
81. How can you customize Actuator endpoints, including adding custom health checks?
82. Describe the security considerations for protecting Actuator endpoints in production.
83. Spring Boot DevTools:
84.
85. What is Spring Boot DevTools, and how does it enhance development productivity?
86. How do you configure and use DevTools in a Spring Boot project?
87. Explain the automatic application restart feature in DevTools.
88. Discuss other features and capabilities provided by Spring Boot DevTools.
89. Spring Boot Caching:
90.
91. Describe the purpose of caching in Spring Boot and its benefits.
92. Implement method-level caching using annotations like @Cacheable and
@CacheEvict.
93. How can you configure and use different caching providers (e.g., Redis, Ehcache) in
Spring Boot?
94. Discuss caching strategies and when to apply caching in a Spring Boot application.
95. Spring Boot WebSockets:
96.
97. What are WebSockets, and how do they enable real-time communication in web
applications?
98. Create a Spring Boot application that utilizes WebSockets for real-time chat
functionality.
99. Explain the role of WebSocket configurators and endpoint handlers in Spring Boot.
100. Discuss the advantages of WebSockets for features like live notifications and
online collaboration.
101. Spring Boot Error Handling:
102.
103. Describe the strategies for handling errors and exceptions in a Spring Boot
application.
104. How can you create custom error pages and exception handling logic using
@ControllerAdvice?
105. Implement a global exception handler in a Spring Boot REST API to provide
consistent error responses.
106. Discuss best practices for handling and logging errors in Spring Boot
applications.
107. Spring Boot Cloud Native Features:
108.
109. Explain the cloud-native features provided by Spring Boot, such as service
discovery and configuration management.
110. How does Spring Cloud integrate with Spring Boot for building cloud-native
applications?
111. Describe the benefits of using Spring Boot and Spring Cloud in a microservices
architecture.
112. Provide examples of cloud-native patterns like centralized configuration and
load balancing in Spring Boot applications.