Skip to main content

Top 10 Spring Boot Interview Questions and Answers

1. What is Spring boot?
Spring Boot makes it easier for you to create production ready applications in no time. It is an opinionated view to create Spring application quickly. It follows convention over configuration. In simple terms, it comes with default configurations for most of the Spring projects, you don’t need to do much to bootstrap any spring application.

2. Why did you use Spring boot in your application?
As discussed earlier, Spring boot makes it easier for you to create Spring application, it can save a lot of time and efforts.

For example: Let’s say you want to create Spring boot project with activeMQ. You can simply use “spring–boot–starter–activemq” as artifact Id, it will take all the defaults and create Spring application with ActiveMQ configured. Let’s say you don’t want to use inbuilt activeMQ, you can simply override “spring.activemq.broker-url” in application.properties to use external ActiveMQ.

3. Can you list advantages of Spring boot?
Advantages of Spring boot are:

It provides a lot of default configurations which help you to create Spring application faster.
It comes with embedded tomcat or jetty server, so you don’t have to deploy jar.
It reduces development code by avoiding a lot of boilerplate code.
It increases productivity as you can create Spring application quickly.
It provides a lot of starter project for easy maven integration.You don’t have to worry about version mismatch.
You can quickly create using sample project using spring boot initializer
4. What are disadvantages of Spring boot?
If you want to convert your old spring application to Spring boot application, it may not be straight forward and can be time consuming.

5. How can you override default properties in Spring boot Project?
Spring boot provides a lot of properties which can be overridden by specifying them in application.properties.

For example: You want to specify prefix and suffix in Spring MVC applications. You can simply do it by putting below properties in application.properties.

spring.mvc.view.prefix: /WEB-INF/
spring.mvc.view.suffix: .jsp

6. How can you run Spring boot application on custom port?
You can simply put server.port properties in application.properties.

For example:server.port=8050

7. What is Spring boot starter and how it is useful?
Spring boot comes with a lot of starters which is set of convenient dependency descriptors which you can include in your pom.xml.

For example: Let’s say you want to work Spring MVC application, you can simply include “spring–boot–starter–web” as dependency in pom.xml .

8. Can we use Spring boot with applications which are not using Spring?
No, it is not possible as of now. Spring boot is limited to Spring applications only.

9. What is name of the configuration file which you use in Spring boot?
Configuration file used in Spring boot projects is application.properties. It is very important file as it is used to override all default configurations.

10. What is DevTools in Spring boot?
Spring boot comes with DevTools which is introduced to increase the productivity of developer. You don’t need to redeploy your application every time you make the changes.Developer can simply reload the changes without restart of the server. It avoids pain of redeploying application every time when you make any change. This module will be disabled in production environment.


Meet The Experts For Better Guidence : https://nareshit.com/spring-online-training/

Comments

Popular posts from this blog

fire protection worker training = Brandschutzhelfer Schulung

Fire protection training courses provide employees with the knowledge they need to prevent fire. It also teaches them how to react in the event of a fire. It is often the first post-fire reaction that matters most. Here we offer training courses on how to protect yourself in the event of a fire and the instructions that you must also follow. Fire protection instruction Munich Fire protection Munich Fire protection instruction Training fire protection workers in munich fire protection worker training fire protection training

כיצד כלכלה מעגלית מקדמת בו בזמן אינטרסים כלכליים וסביבתיים?

כלכלה מעגלית היא גישה בת קיימא לסביבה הרגישה שלנו. תעשיינים, יצרנים וצרכנים התמקדו קודם לכן בדפוס שאינו בר-קיימא:לייצור להשתמש ולהשליך בעזרת כלכלה מעגלית, אנו יכולים לראות שינוי דרסטי לטובה של הכלכלה והסביבה שלנו . בהמשך המאמר תגלה כיצד הדבר אפשרי בעזרת עקרונות הכלכלה המעגלית. המאפיינים של כלכלה מעגלית מסייעים לקיימות כלכלית וסביבתית. טיפול מכני בפסולת תעשייתית: מהנדסי סביבה לומדים ועובדים עם כלים מכניים ומכונות. כלים אלה נועדו להפחתת ההשפעות המזיקות של הפסולת. מומלץ למפעלים להתייעץ עם מהנדסים אלה על מנת לקרוא עוד על שיטות לניהול פסולת תעשייתית. במסגרת תפקידם הם יודעים איך כלכלה מעגלית רלוונטית כאן. הם יודעים איך לכלול כלים לניהול פסולת תעשייתית מבלי לפגוע בסביבה. אין בזבוז של חומרי גלם: כלכלה מעגלית יוצרת לולאה סגורה. לכל מוצר במפעל צריך להיות שימוש בקצה, כולל הפסולת. שימוש  חוזר בחומרים: יועצי סביבה עוזרים לך בהיבט הזה. הם מלמדים ומייעצים כיצד לעשות שימוש חוזר בחומר אם יש להם את האפשרות. במידה ואין, הם ינחו אותך כיצד להשתמש בשאריות החומר במידת הצורך. פעולה זו מובילה לפחות נטל על המט

Let’s Get Aware About special BUYSMM

In the present day, the craze of social internet marketing is escalating at a surprising rate because every person in this world desires to enhance their online presence and sales. There are various forms of social media tools that folks utilize, for instance, twitter, Instagram, Facebook, youtube, TikTok, plus much more. These applications are usually the main weapon of each and every business person to improve their online presence, and even there are many persons around the globe who would like to get famous with these systems. A few tactics are also utilized by a lot of folks to maximize followers, likes, views, subscribers, comments, and even more on these social networking platforms. Among all social networking platforms, Instagram is a very popular system in which everyone wants to gain followers, likes, and views, and this platform is commonly used by numerous people. Lots of the folks think that it's easy to enhance the followers as well as likes, but actually it's not