• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Recommended Reading List for SpringBoot?

 
Ranch Hand
Posts: 428
  • Number of slices to send:
    Optional 'thank-you' note:

Why would I want to use spring boot instead of tomcat/jetty?

I tried out the groovy demo for spring boot and I was impressed. However, I'm not sure what it is good for besides tutorials on spring REST.

Is spring boot the recommend way to implement micro-services?

Can someone give me a recommended reading list for spring boot and microservices?
Thanks
Siegfried

 
author
Posts: 422
13
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

It's not a choice of Spring Boot vs. Tomcat/Jetty. In fact, even if you're using the Spring Boot CLI, you will be using Tomcat (just as an embedded container instead of in a more traditional sense).

Spring Boot is about 4 main things:
- Automatic configuration, so that you don't have to explicitly write Spring configuration for common needs. In fact, a *LOT* of configuration in Spring is unneeded in a Spring Boot app.
- Starter dependencies, which leverage transitive dependency resolution of Maven or Gradle so that you can collectively add dependencies that provide a facet of working with Spring (e.g., if you're building a web app, add the web starter to your build).
- The actuator, which lets you peek inside the running application, looking at things like threads, beans, etc.
- The CLI which lets you write your app as Groovy scripts which are run from the command line.

It's that list item, the CLI, which probably prompted your question. The CLI is really nice and there's no reason it couldn't be the deployment you use in production. For example, if your production environment is CloudFoundry, you can "cf push" a CLI-based app to the cloud and it will "just work". On the other hand, you may want a more traditional deployment model where you deploy a WAR file to Tomcat/Jetty/Weblogic/etc. You can also build that kind of app with Spring Boot and still leverage autoconfiguration, the starters, and the Actuator.

Unfortunately, there are no books out on Spring Boot (yet). Spring in Action 4 will contain a chapter on Spring Boot. Packt is publishing a book on Spring Boot that I'm aware of. And...keep it between you, me and everyone else reading this forum...I happen to know that Manning will be publishing a book on Spring Boot early next year (shhh...don't say anything). Also, to be honest, the Spring Boot reference docs are excellent. They're very much a reference guide and not really tutorial style and thus may not be good to learn from. But they are otherwise fantastic.



Siegfried Heintze wrote:
Why would I want to use spring boot instead of tomcat/jetty?

I tried out the groovy demo for spring boot and I was impressed. However, I'm not sure what it is good for besides tutorials on spring REST.

Is spring boot the recommend way to implement micro-services?

Can someone give me a recommended reading list for spring boot and microservices?
Thanks
Siegfried

 
Siegfried Heintze
Ranch Hand
Posts: 428
  • Number of slices to send:
    Optional 'thank-you' note:
So if I build a new Spring MVC or Spring REST service that uses spring boot, what options do I have for deployment?

I was assuming deployent in production clouds like Microsoft Azure, Amazon AWS or Google App Engine basically mean dropping a WAR file into tomcat or jetty.
Is this still true with spring boot?
If so, how does spring boot help me (besides reducing configuation parameters)?

What new deployement options does spring boot give me?

What advantage is there to the CLI option for a production environent? I suppose it would save you the trouble of installing tomcat or jetty but I never found those to be particularly troublesome installations.

What is the difference between the features of the actuator and using MBeans and JConsole?

Are all these configuration parameters that spring boot saves me from in the web.xml and *context.xml files?
Thanks
siegfried
 
Craig Walls
author
Posts: 422
13
  • Number of slices to send:
    Optional 'thank-you' note:

Lots of questions here, but most of them boil down to the question of what kind of deployment options you have with Spring Boot and if you choose a conventional deployment option, then what benefit does Spring Boot provide...Okay...here goes...

If you're using the CLI, then you have two deployment options currently:
- Deploying to CloudFoundry by "cf push" from the project directory.
- Creating an executable JAR file with an embedded Tomcat or Jetty (with the "spring jar" command). This JAR can be pushed to CloudFoundry or with a Procfile, this can be deployed to other PaaS providers such as Heroku.

Of course, while you're developing the app, you can run the app with "spring run" and run tests with "spring test".

Stepping away from the CLI, you can build your app in a more conventional way using Maven or Gradle. The deployment options here are:
- Building an executable JAR file that is equivalent to what you'd get from the CLI with "spring jar". The same deployment options apply here.
- Building a WAR file that can be deployed to any Servlet 3.0 container or Java-supporting PaaS providers like CloudFoundry. Optionally, you can make the WAR file executable so you get the best of both worlds...a deployable WAR and a command-line runnable distribution.

Let's say you go with the last option...the conventional WAR option. What are the benefits of Spring Boot in this case?

Well, autoconfiguration goes a *LONG* way here. Most apps will have some Spring configuration, but it is possible to write an app with little or no Spring configuration whatsoever. For an example see https://github.com/habuma/spring-boot-examples/tree/master/contacts_war. This is a simple, but complete Spring application. The *ONLY* Spring configuration in this project are lines 7-9 in Application.java. Even then, one of those lines turns on autoconfiguration and another turns on component-scanning (a form of autoconfiguration that's been around since Spring 2.5). Note that there's no web.xml, no XML Spring configuration, and aside from those 3 lines in Application.java no Spring configuration at all. The main() method in Application.java is optional in this case, but I left it in to demonstrate how the WAR can be both deployable and executable. There is an application.yml file, but that's for application-level configuration, not Spring configuration.

In short: Spring Boot took a lot of boilerplate configuration off my hands so that I could focus on writing the code that implements the application functionality. *THAT* is the benefit of Spring Boot.

And, oh yeah, notice the build files mostly reference starter dependencies and no versions are specified (the starter parent defines those).


You also asked how the Actuator compares to JMX management. JMX offers the option for management of any bean in a Spring app. Actuator is more focused on what's going on Spring-wise. For example:
- What beans were created in the Spring container (whether auto-configured or explicitly configured)?
- What auto-configuration decisions were made?
- What environment and system properties are available to the app? What command-line parameters?
- What is the current state of the threads?
- What were some of the most recent requests? Did they succeed with HTTP 200? What were the headers on the requests and their responses?
- What is the health of my application components? (BTW, this one is pluggable, enabling you to provide your own health indicators.)

The best way to understand the benefits of Spring Boot is to try it out. Once you've written even a small app with Spring Boot, you'll hate having to go back to not using Spring Boot. There's just so much boilerplate you're responsible for if Spring Boot isn't in play.


Siegfried Heintze wrote:So if I build a new Spring MVC or Spring REST service that uses spring boot, what options do I have for deployment?

I was assuming deployent in production clouds like Microsoft Azure, Amazon AWS or Google App Engine basically mean dropping a WAR file into tomcat or jetty.
Is this still true with spring boot?
If so, how does spring boot help me (besides reducing configuation parameters)?

What new deployement options does spring boot give me?

What advantage is there to the CLI option for a production environent? I suppose it would save you the trouble of installing tomcat or jetty but I never found those to be particularly troublesome installations.

What is the difference between the features of the actuator and using MBeans and JConsole?

Are all these configuration parameters that spring boot saves me from in the web.xml and *context.xml files?
Thanks
siegfried

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic
vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |