{"id":63495,"date":"2017-01-31T16:00:14","date_gmt":"2017-01-31T14:00:14","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=63495"},"modified":"2017-01-31T12:09:30","modified_gmt":"2017-01-31T10:09:30","slug":"spring-boot-right-boot","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html","title":{"rendered":"Spring Boot &#8211; The Right Boot for you!"},"content":{"rendered":"<p>Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.<\/p>\n<p>In this blog, I will walk you through the step-by-step process for getting Spring Boot going on your machine.<\/p>\n<h2>Just put them on and lace them up\u2026<\/h2>\n<p><a href=\"https:\/\/projects.spring.io\/spring-boot\/\" target=\"_blank\">Spring Boot<\/a> makes it easy to create stand-alone, production-grade Spring-based applications that you can \u201cjust run.\u201d You can get started with minimum fuss due to the it taking an opinionated view of the Spring platform and third-party libraries. Most Spring Boot applications need very little Spring configuration.<\/p>\n<h2>These boots are made for walking\u2026maybe running<\/h2>\n<p>So the greatest thing about Spring Boot is the ability to be up and running in very little time. You don\u2019t have to install a web server like JBoss, Websphere, or even Tomcat for that matter. All you need to do is pull in the proper libraries, annotate, and fire away. If you are going to do a lot of Spring Boot projects, I would highly suggest using the Spring Tool Suite that is available. It has some great features for making Boot projects really easy to manage.<\/p>\n<p>You can of course choose between Maven or Gradle to manage dependencies and builds. My examples will be in Maven as it is what I am familiar with. It\u2019s all about your configuration preference.<\/p>\n<h2>Many different styles to choose from<\/h2>\n<p>One of the things that makes Spring Boot great is that it works really well with other Spring offerings. Wow, go figure? You can use Spring MVC, Jetty, or Thymeleaf just by adding them to your dependencies and Spring Boot automatically adds them in.<\/p>\n<h3>Every day boots<\/h3>\n<p>Spring Boot wants to make things easy for you. You can do a whole host of things with it. Here is a list of some of the highlights.<\/p>\n<ul>\n<li>Spring Boot lets you package up an application in a standalone JAR file, with a full Tomcat server embedded<\/li>\n<li>Spring Boot lets you package up an application as a WAR still.<\/li>\n<li>Configuration is based on what is in the classpath (MySQL DB in the path, it\u2019ll set it up for you)<\/li>\n<li>It has defaults set (so you don\u2019t have to configure them)<\/li>\n<li>Easily overridden by adding to the classpath (add H2 dependency and it\u2019ll switch)<\/li>\n<li>Let\u2019s new devs learn the ropes in a hurry and make changes later as they learn more.<\/li>\n<\/ul>\n<h3>Baby boots<\/h3>\n<p>But remember, the aim of this blog is just to get you familiar with how to get Spring Boot going on your machine. It is going to be fairly straightforward and vanilla. The goal is to get you started. We\u2019re not trying to code a new Uber app or something here. Baby steps folks! We just want to get your feet warm. We all know those tutorials that throw tons of stuff at us and just gloss over things. Not here.<\/p>\n<p>So to get started the easiest way is to pull down the tutorial code from Spring itself. It has a great getting-started point. It is a good for you to see what is happening without throwing the whole Spring library at you.<\/p>\n<h3>Clone boots\u2026watch your aim!<\/h3>\n<p>First off, let\u2019s clone the Spring example found <a href=\"https:\/\/github.com\/spring-guides\/gs-spring-boot.git\">here<\/a>.<\/p>\n<pre class=\"brush:bash\">git clone https:\/\/github.com\/spring-guides\/gs-spring-boot.git<\/pre>\n<p>We won\u2019t go into the steps of setting it up in an IDE as everyone will have their own preference.<\/p>\n<h3>Construction Boots<\/h3>\n<p>Let\u2019s break things down a bit. What are these annotations about?<\/p>\n<p><code>@SpringBootApplication<\/code> is a convenience annotation that adds all of the following:<\/p>\n<ul>\n<li><code>@Configuration<\/code> tags the class as a source of bean definitions for the application context.<\/li>\n<li><code>@EnableAutoConfiguration<\/code> tells Spring Boot to start adding beans based on classpath settings, other beans, and various property settings.<\/li>\n<li>Normally you would add <code>@EnableWebMvc<\/code> for a Spring MVC app, but Spring Boot adds it automatically when it sees <code>spring-webmvc<\/code> on the classpath. This flags the application as a web application and activates key behaviors such as setting up a <code>DispatcherServlet<\/code>.<\/li>\n<li><code>@ComponentScan<\/code> tells Spring to look for other components, configurations, and services in the the hello package, allowing it to find the controllers.<\/li>\n<\/ul>\n<p>Wow, I have always liked quality built-ins when looking for a new home! But what\u2019s really happening behind these shiny new items?<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>The <code>main()<\/code> method calls out Spring Boot\u2019s <code>SpringApplication.run()<\/code> method to launch.<\/p>\n<p>Did we mention (or did you notice) that you didn\u2019t have to mess around with XML? What a bonus! No more <code>web.xml<\/code> file nonsense. No more wondering if I put the right tag in the file and wondering what the problem is with the paragraph of unreadable error message telling you just about nothing any longer. This is 100% pure Java. No configuration or plumbing needed. They have done it for you. How nice of them!<\/p>\n<p>Once it is set up and ready for you to begin editing, let\u2019s take a quick look at the <code>Application.java<\/code> file. Here you will find a runnable <code>main<\/code> class. It has an annotation of <code>@SpringBootApplication<\/code>. This is the key annotation that makes this application a Boot app.<\/p>\n<pre class=\"brush:java\">package hello;\r\n\r\nimport java.util.Arrays;\r\n\r\nimport org.springframework.boot.CommandLineRunner;\r\nimport org.springframework.boot.SpringApplication;\r\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\r\nimport org.springframework.context.ApplicationContext;\r\nimport org.springframework.context.annotation.Bean;\r\n\r\n@SpringBootApplication\r\npublic class Application {\r\n\r\n    public static void main(String[] args) {\r\n        SpringApplication.run(Application.class, args);\r\n    }\r\n\r\n    @Bean\r\n    public CommandLineRunner commandLineRunner(ApplicationContext ctx) {\r\n        return args -&gt; {\r\n\r\n            System.out.println(\"Let's inspect the beans provided by Spring Boot:\");\r\n\r\n            String[] beanNames = ctx.getBeanDefinitionNames();\r\n            Arrays.sort(beanNames);\r\n            for (String beanName : beanNames) {\r\n                System.out.println(beanName);\r\n            }\r\n\r\n        };\r\n    }\r\n\r\n}<\/pre>\n<p>Now to run it! If you are using the STS suite (and properly built it), you will see it in your Boot Dashboard. For everyone else, either right click in the IDE and Run As =&gt; Java Application, or head to your favorite command line tool. Use the following commands.<\/p>\n<p><strong>Maven:<\/strong><\/p>\n<pre class=\"brush:java\">mvn package &amp;&amp; java -jar target\/gs-spring-boot-0.1.0.jar<\/pre>\n<p><strong>Gradle:<\/strong><\/p>\n<pre class=\"brush:java\">.\/gradlew build &amp;&amp; java -jar build\/libs\/gs-spring-boot-0.1.0.jar<\/pre>\n<p>The output will show the normal Spring startup of the embedded server and then it will loop over all the beans and write them out for you!<\/p>\n<p>You did it! You tied your first pair of Spring Boots.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot1.png\"><img decoding=\"async\" class=\"aligncenter wp-image-63500\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot1-1024x230.png\" width=\"860\" height=\"193\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot1-1024x230.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot1-300x67.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot1-768x172.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot1.png 1248w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot2.png\"><img decoding=\"async\" class=\"aligncenter wp-image-63501\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot2.png\" width=\"860\" height=\"248\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot2.png 1120w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot2-300x87.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot2-768x221.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2017\/01\/SpringBoot2-1024x295.png 1024w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<h3>Boots on display<\/h3>\n<p>To make the sale or just to get your eyes on the prize, this example throws in a <code>CommandLineRunner<\/code> method marked as a <code>@Bean<\/code> and this runs on startup. It retrieves all the beans that were created either by your app or were automatically added thanks to Spring Boot. It sorts them and prints them out. You can put other startup information or do some other little bit of work if you would like.<\/p>\n<h3>Boots online<\/h3>\n<p>While shopping for the right boot, we want the nice ones that will go with our favorite pair of jeans or for the ladies a nice skirt, right? Well Boot provides a simple way to get your boots out to the world for others to see. Well, we need to employ a <code>Controller<\/code> to do so. How convenient: the Spring code we downloaded has one already for us.<\/p>\n<pre class=\"brush:java\">package hello;\r\n\r\nimport org.springframework.web.bind.annotation.RestController;\r\nimport org.springframework.web.bind.annotation.RequestMapping;\r\n\r\n@RestController\r\npublic class HelloController {\r\n\r\n    @RequestMapping(\"\/\")\r\n    public String index() {\r\n        return \"Greetings from Spring Boot!\";\r\n    }\r\n\r\n}<\/pre>\n<p>The two things that are most important here are the <code>@RestController<\/code> and the <code>@RequestMapping<\/code> annotations you see.<\/p>\n<p>The <code>@RestController<\/code> is a subliminal message that it is nap time. Errr, wait sorry, I was getting sleepy. No, it means we have a RESTful controller waiting, watching, listening to our application\u2019s call to it.<\/p>\n<p>The <code>@RequestMapping<\/code> is the url designation that calls the particular method. So in the case of the given example, it is the \u201cindex\u201d of the application. The example here is simply returning text. Here\u2019s the cool thing; we can return just about anything here that you want to return.<\/p>\n<h2>Did JSON have nice boots on the Argo?<\/h2>\n<p>Finally, what I think most adventurers into Spring Boot are doing now is using it as an endpoint to their applications. There are a whole host of different options as to how you can accomplish this. Either by JSON provided data or XML solutions. We\u2019ll just focus on one for now. Jackson is a nice lightweight tool for accomplishing JSON output to the calling scenario.<\/p>\n<p>Jackson is conveniently found on the classpath of Spring Boot by default. Check it out for yourself:<\/p>\n<pre class=\"brush:java\">mvn dependency:tree`<\/pre>\n<p>or<\/p>\n<pre class=\"brush:java&quot;\">.\/gradlew dependencies<\/pre>\n<p>Let\u2019s add some pizazz to these boots, already! Add a new class wherever you would like to in your source. Just a POJO.<\/p>\n<pre class=\"brush:java\">public class Greeting {\r\n\r\n    private final long id;\r\n    private final String content;\r\n\r\n    public Greeting(long id, String content) {\r\n        this.id = id;\r\n        this.content = content;\r\n    }\r\n\r\n    public long getId() {\r\n        return id;\r\n    }\r\n\r\n    public String getContent() {\r\n        return content;\r\n    }\r\n\r\n}<\/pre>\n<p>Now, head back to your <code><\/code>Controller and paste this in:<\/p>\n<pre class=\"brush:java\">private static final String template = \"Ahoy, %s!\";\r\nprivate final AtomicLong counter = new AtomicLong();\r\n\r\n@RequestMapping(method=RequestMethod.GET)\r\n    public @ResponseBody Greeting sayHello(@RequestParam(value=\"name\", required=false, defaultValue=\"Argonaut\") String name) {\r\n        return new Greeting(counter.incrementAndGet(), String.format(template, name));\r\n    }<\/pre>\n<p>Now restart your Boot app. Go back to a browser and instead of <code>\/<\/code>, go to <code>hello-world<\/code>. You should see some awesome JSON output. If you did, then you are well on your way to creating endpoints in Spring Boot and Jackson.<\/p>\n<h3>The Argo needs another port<\/h3>\n<p>Since a lot of folks are writing endpoints and have multiple sites going on, you\u2019ll probably want to change the default port of 8080 to something else. So the easiest and most straightforward way is to add an <code>application.properties<\/code> file to <code>src\/main\/resources<\/code>.<\/p>\n<p>All that is need is this:<\/p>\n<pre class=\"brush:java\">server.port = 8090<\/pre>\n<p>Easy peasy. Weigh anchor and set sail!<\/p>\n<h2>Boot camp conclusion<\/h2>\n<p>So you can see how easy it is to get things going with Spring Boot. We didn\u2019t have to do much in the way of configuration to actually get up and running in a hurry. We avoided the dreaded XML files and only added a small properties file. The built-ins are extremely nice to already have in the stack. Jackson provides an easy to use JSON conversion for those of us wanting to provide endpoints for our shiny frontends.<\/p>\n<p>Again, Spring seems to find a way to make life simpler for the developer. This blog was kept simple on purpose. There are many different avenues to venture down in our new boots. Whether you want to leverage microservices, build a traditional monolith, or some other twist that may be out there, you can see how Spring Boot can get you started in a hurry.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"https:\/\/keyholesoftware.com\/2017\/01\/30\/spring-boot-the-right-boot-for-you\/\">Spring Boot &#8211; The Right Boot for you!<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/join-us\/jcg\/\">JCG partner<\/a>\u00a0Matt McCandless at the <a href=\"http:\/\/keyholesoftware.com\/\">Keyhole Software<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible. In this blog, &hellip;<\/p>\n","protected":false},"author":1095,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30,854],"class_list":["post-63495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot - The Right Boot for you! - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot - The Right Boot for you! - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-31T14:00:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Matt McCandless\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matt McCandless\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html\"},\"author\":{\"name\":\"Matt McCandless\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/393e125150238ba99ee32ecf5457fc5c\"},\"headline\":\"Spring Boot &#8211; The Right Boot for you!\",\"datePublished\":\"2017-01-31T14:00:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html\"},\"wordCount\":1597,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\",\"Spring Boot\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html\",\"name\":\"Spring Boot - The Right Boot for you! - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2017-01-31T14:00:14+00:00\",\"description\":\"Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2017\\\/01\\\/spring-boot-right-boot.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Boot &#8211; The Right Boot for you!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/393e125150238ba99ee32ecf5457fc5c\",\"name\":\"Matt McCandless\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/261733d5308756e2c8816dcccd611e4ae5f82d7e697e0c9a4feeb53ca799f4d2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/261733d5308756e2c8816dcccd611e4ae5f82d7e697e0c9a4feeb53ca799f4d2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/261733d5308756e2c8816dcccd611e4ae5f82d7e697e0c9a4feeb53ca799f4d2?s=96&d=mm&r=g\",\"caption\":\"Matt McCandless\"},\"description\":\"Matt McCandless is a developer based in Wichita, KS. He is married to his wife Melissa of 15 years and has 4 kids. Currently developing in BackboneJS, Matt has experience in Java, JavaScript, PL\\\/SQL, Perl and other various languages. He spends a lot of his spare time with the kids and spending time outside, occasionally running a 5k here and there to keep himself in shape.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/matt-mccandless\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot - The Right Boot for you! - Java Code Geeks","description":"Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html","og_locale":"en_US","og_type":"article","og_title":"Spring Boot - The Right Boot for you! - Java Code Geeks","og_description":"Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated","og_url":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2017-01-31T14:00:14+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Matt McCandless","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Matt McCandless","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html"},"author":{"name":"Matt McCandless","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/393e125150238ba99ee32ecf5457fc5c"},"headline":"Spring Boot &#8211; The Right Boot for you!","datePublished":"2017-01-31T14:00:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html"},"wordCount":1597,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring","Spring Boot"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html","url":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html","name":"Spring Boot - The Right Boot for you! - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2017-01-31T14:00:14+00:00","description":"Need a little spring in your step? Tired of all those heavy web servers and deploying WAR files? Well you\u2019re in luck. Spring Boot takes an opinionated","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2017\/01\/spring-boot-right-boot.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Boot &#8211; The Right Boot for you!"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/393e125150238ba99ee32ecf5457fc5c","name":"Matt McCandless","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/261733d5308756e2c8816dcccd611e4ae5f82d7e697e0c9a4feeb53ca799f4d2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/261733d5308756e2c8816dcccd611e4ae5f82d7e697e0c9a4feeb53ca799f4d2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/261733d5308756e2c8816dcccd611e4ae5f82d7e697e0c9a4feeb53ca799f4d2?s=96&d=mm&r=g","caption":"Matt McCandless"},"description":"Matt McCandless is a developer based in Wichita, KS. He is married to his wife Melissa of 15 years and has 4 kids. Currently developing in BackboneJS, Matt has experience in Java, JavaScript, PL\/SQL, Perl and other various languages. He spends a lot of his spare time with the kids and spending time outside, occasionally running a 5k here and there to keep himself in shape.","url":"https:\/\/www.javacodegeeks.com\/author\/matt-mccandless"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/63495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/1095"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=63495"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/63495\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=63495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=63495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=63495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}