This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin Cookbook and have Ken Kousen on-line!
See this thread for details.
Win a copy of Kotlin Cookbook this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

difference between Spring Boot and Spring

 
Greenhorn
Posts: 14
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between Spring Boot and Spring (which I didn't realize came with Tomcat...I don't recall seeing it on my cloud VM bundles here at work).
 
Bartender
Posts: 9610
16
Mac OS X Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring Boot simplifies the creation and configuration of Spring applications.  I don't know about you, but I've run into problems with Spring trying to get the correct version of a dependency to work with a particular Spring library or figuring out which configuration switch to set in order to get the expected behavior.  You ever play Myst?  It's like that.
Spring Boot removes a lot of the mystery out of Spring by defining the expected behavior up front.  Dependency versions are explicitly declared, so one doesn't have to hunt around for the correct version of X to go with Spring version Y.  It can also embed a server (Tomcat, Jetty or Undertow) with the application which makes deployment easier and, I presume, using containers like Docker easier as well.
 
Saloon Keeper
Posts: 21478
144
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Formally, it's not "Spring", it's The Spring Framework. Just "Spring" for short.

Spring has at its core a Bean Factory - a service class that servers as a general-purpose creator and dispenser of JavaBean objects. Given the name of a bean in its inventory - which is often defined by an XML file and/or annotations on included bean classes - the factory can then create and initialize an instance of that bean. Or, if the bean is defined as a singleton object, create the first instance and pass references to it to subsequent requesters.

Along with basic construction, the factory may also inject references to other Spring-managed beans into a bean being initialized before it's returned to the requester. That implements the Inversion of Control (IoC) or "wiring" pattern where you don't make beans connect themselves to each other, but instead have the framework do it automatically. Which makes it easier to build a project out of pre-defined parts as well as swapping plug-compatible parts for things like testing. I like to consider it the software equivalent of a TinkerToyâ„¢ set.

Over the years, a number of functional support subsystems ("Projects") have been built as optional add-ons to the core Spring. For example, Spring Data deals with persistent data storage and provides an abstract mechanism for database CRUD functions and finders. Under it are different flavors such as raw JDBC, JPA, graph databases (Neo4J) and NoSQL databases. Spring Data takes care of a lot of the repetitive coding automatically, including error recovery and it normalizes error exceptions to make it easier for an application to tell why a request failed.

Spring Data is popular, but there's a lot more, including Spring Scheduling, Spring Batch, Spring Web, Spring Security, and on and on.

Spring Boot is a relatively new and very popular Spring Project. Instead of developing individual webapps that must be configured and deployed into webapp servers, Spring Boot builds a stand-alone application that contains a webapp server and a user application all rolled into one and ready to launch with a single command. This is certainly useful for making desktop-based web apps (At one time, VMWare had a console app like that, but alas, before Spring Boot), but in today's container-based paradigm it's a natural fit for a container. A relatively simple Dockerfile, a Spring Boot executable and you can be deploying a whole farm of elastic hosts in less than an hour!

 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!