JAVA EXAMPLE PROGRAMS

JAVA EXAMPLE PROGRAMS

Publish Your Article Here

What are the advantages and disadvantages of Spring Boot?


Answer:

This answer is based on my personal opinion, it may vary from person to person:

Spring Boot Advantages

  1. Simplified & version conflict free dependency management through the starter POMs.
  2. We can quickly setup and run standalone, web applications and micro services at very less time.
  3. You can just assemble the jar artifact which comes with an embedded Tomact, Jetty or Undertow application server and you are ready to go.
  4. Spring Boot provides HTTP endpoints to access application internals like detailed metrics, application inner working, health status, etc.
  5. No XML based configurations at all. Very much simplified properties. The beans are initialized, configured and wired automatically.
  6. The Spring Initializer provides a project generator to make you productive with the certain technology stack from the beginning. You can create a skeleton project with web, data access (relational and NoSQL datastores), cloud, or messaging support.

Spring Boot Disadvantages

  1. Spring boot may unnecessarily increase the deployment binary size with unused dependencies.
  2. If you are a control freak, I doubt Spring Boot would fit your needs.
  3. Spring Boot sticks good with micro services. The Spring Boot artifacts can be deployed directly into Docker containers. In a large and monolithic based applications, I would not encourage you to use Spring Boot.

<< Previous Question | Next Question >>

List Of Java Interview Questions:

  1. Previous set of java interview questions
  2. What is difference between Lambda Expression and Anonymous class?
  3. What is HTTP basic authentication?
  4. What is functional interface in java?
  5. What is the difference between HTTP methods GET and POST?
  6. What is difference between CountDownLatch and CyclicBarrier in Java?
  7. Can Enum extend any class in Java?
  8. Can Enum implements any interface in Java?
  9. Can we have constructor in abstract class?
  10. What is MVC pattern?
  11. What is ActionServlet in struts?
  12. What is the difference between servlet & Filter?
  13. What is ActionMapping in struts?
  14. What is the difference between application server and web server?
  15. What is the difference between JPA and Hibernate?
  16. What is difference between the Value Object and JDO?
  17. How Struts control data flow?
  18. What is Spring?
  19. What is Dependency Injection?
  20. What are the different types of dependency injections in spring?
  21. What is BeanFactory in Spring?
  22. What is difference between BeanFactory and ApplicationContext in spring?
  23. How to make a bean as singleton in spring?
  24. What is IOC or inversion of control?
  25. What are different types of spring auto-wiring modes?
  26. What are the limitations and disadvantages of spring autowiring?
  27. Is the spring singleton bean thread safe?
  28. Why ConcurrentHashMap is faster than Hashtable in Java?
  29. What is the difference between ConcurrentHashMap and Hashtable in Java?
  30. Difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
  31. What is the difference between ORM, JPA and Hibernate?
  32. What is stream pipelining in Java 8?
  33. What is interface default method in java 8?
  34. Java-8: Interface with default methods vs Abstract class.
  35. What is @SpringBootApplication annotation in Spring boot project?
  36. What Embedded Containers Does Spring Boot Support?
  37. What are the advantages and disadvantages of Spring Boot?
  38. What is Spring Boot Actuator?
  39. What is Spring Boot Initializr?
  40. How does Maven resolve version conflicts of dependencies?
  41. How to reload Spring Boot Application without restarting server?
  42. What is the difference between Spring Boot and the Spring framework?
  43. What are the key components of Spring Boot framework?
  44. What are the different types of bean scope in Spring framework?
  45. What are the standard Spring build-in events?
  46. What is Spring IoC container?
  47. Differences between BeanFactory and the ApplicationContext in Spring framework.
  48. Difference between constructor injection and setter injection in Spring.
  49. How Java-8 Streams differ from collections
  50. What are the various ways to obtain Streams in Java-8?
  51. List Java-8 Streams intermediate operations.
  52. List Java-8 Streams terminal operations.
  53. Can we reuse Java-8 Streams?
  54. Difference between map and flatMap methods in Java 8
  55. What is the difference between Closure and Lambda in Java 8?
  56. Does Java 8 Lambda supports recursive call?
  57. Can Java 8 default methods override equals, hashCode and toString?
  58. Hibernate Eager vs Lazy Fetch Type
  59. What is POJO?
  60. What is HQL (Hibernate Query Language)?
Knowledge Centre
Can we call servlet destory() from service()?
As you know, destory() is part of servlet life cycle methods, it is used to kill the servlet instance. Servlet Engine is used to call destory(). In case, if you call destory method from service(), it just execute the code written in the destory(), but it wont kill the servlet instance. destroy() will be called before killing the servlet instance by servlet engine.
Famous Quotations
It is easier to fight for one’s principles than to live up to them.
-- Alfred Adler

About Author

I'm Nataraja Gootooru, programmer by profession and passionate about technologies. All examples given here are as simple as possible to help beginners. The source code is compiled and tested in my dev environment.

If you come across any mistakes or bugs, please email me to [email protected].

Most Visited Pages

Other Interesting Sites

Reference: Java™ Platform Standard Ed. 7 - API Specification | Java™ Platform Standard Ed. 8 - API Specification | Java is registered trademark of Oracle.
Privacy Policy | Copyright © 2022 by Nataraja Gootooru. All Rights Reserved.