Java Spring Boot & Microservices | Java Spring Boot & Microservices Interview Questions Set - 3
Q21. How to create a login page in spring boot?
You can create a simple and default login page in spring boot by using Spring security and it secures all HTTP endpoints where the user has to login into the default HTTP form provided by spring. We need to add spring-boot-starter-security dependency in your pom.xml or build.gradle and a default username and password can be generated with which you can log in.
Q22. How the bootstrapping happens in Spring Boot?
Bootstrapping of a Spring Boot application can be possible by using Spring Initializer, where creating the spring boot project with required dependencies and execution of application in IDE.
Q23. Why spring boot is used for microservices?
In microservices, you can write code for your single functionality. You can use different technology stacks for different microservices as per the skill set. You can develop this type of microservices with the help of Spring boot very quickly as spring boot gives priority to convention over configuration which increases the productivity of your application development.
Q24. What is Filter in Spring Boot Application.?
Filters will help in intercepting all HTTP incoming requests and outgoing responses. Filters are available by implementing Filter Interface, using FilterRegistrationBean and using MVC controller.
Q25. What is CORS in Spring Boot?
CORS stands for Cross-Origin Resource Sharing is a mechanism implemented by browsers and helps users to authorize cross-domain requests. This mechanism serves as an alternative to less secure and less powerful hacks of the kinds of IFrame or JSONP.
Q26. What are the advantages of Microservices Architecture?
There are plenty of advantages that are offered by Microservices architecture like Microservices can adapt easily to other frameworks or technologies, Failure of a single process does not affect the entire system, provides support to big enterprises as well as small teams, can be deployed independently and in relatively less time, etc.
Q27. Why Reports and Dashboards in Microservices?
Reports and dashboards are mainly used to monitor and track microservices and can be used to find out which microservices expose what resources, find out the services which are impacted whenever changes in a component occur, provide an easy point which can be accessed whenever documentation is required, etc.
Q28. Mention Few drawbacks in using Microservices?
Microservices Requires heavy investment in synchronize the services well all the time, Heavy architecture set up needed for distributed or high-end systems, Excessive planning for handling operations overhead, Autonomous staff selection, etc.
Q29. What is the use of Containers for Microservices?
To manage a microservice based application, containers are the easiest alternative. It helps the user to individually deploy and develop. You can also use Docker to encapsulate the microservice in the image of a container. Without any additional dependencies or effort, microservices can use these elements.
Q30. What is Semantic Monitoring in Microservices?
The primary benefit of Semantic Monitoring is to find out the factors which are more profitable to your business. Semantic monitoring along with service layer monitoring approaches monitoring of microservices from a business point of view. It combines monitoring of the entire application along with automated tests.