{"id":15,"date":"2017-04-16T11:19:06","date_gmt":"2017-04-16T11:19:06","guid":{"rendered":"http:\/\/canchito-dev.com\/public\/blog\/?p=15"},"modified":"2021-05-02T13:51:24","modified_gmt":"2021-05-02T13:51:24","slug":"build-a-project-with-spring-initializer-or-spring-tool-suite","status":"publish","type":"post","link":"http:\/\/www.canchito-dev.com\/public\/blog\/2017\/04\/16\/build-a-project-with-spring-initializer-or-spring-tool-suite\/","title":{"rendered":"Build a project with Spring Initializr or Spring Tool Suite&#x2122;"},"content":{"rendered":"<div class=\"perfect-pullquote vcard pullquote-align-full pullquote-border-placement-left\"><blockquote><p>This guide walks you through using Spring Initializr or Spring Tool Suite&#x2122; for building a simple Java project compatible with Maven and Spring.<\/p><\/blockquote><\/div>\n<div>\n  <a class=\"donate-with-crypto\"\n     href=\"https:\/\/commerce.coinbase.com\/checkout\/faf64f90-2e80-46ee-aeba-0fde14cbeb46\"><br \/>\n    Buy Me a Coffee<br \/>\n  <\/a><br \/>\n  <script src=\"https:\/\/commerce.coinbase.com\/v1\/checkout.js?version=201807\">\n  <\/script>\n<\/div>\n<p style=\"text-align: justify;\"><a style=\"text-align: justify;\" href=\"https:\/\/spring.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Spring<\/a><span style=\"text-align: justify;\">\u00a0is an open source framework\u00a0that\u00a0has become very popular among the members of the Java community, because it can be an alternative to, replacement for, or even addition to the Enterprise JavaBeans (EJB) model.\u00a0According to <\/span><a style=\"text-align: justify;\" href=\"https:\/\/pivotal.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pivotal<\/a><span style=\"text-align: justify;\">, Spring framework helps development teams everywhere build simple, portable,\u00a0fast and flexible JVM-based systems and applications.<\/span><\/p>\n<h1 class=\"sect1\" style=\"text-align: justify;\">What you\u2019ll need<\/h1>\n<ul style=\"text-align: justify;\">\n<li>About 15 minutes<\/li>\n<li>A favorite IDE<\/li>\n<li>Spring Tool Suite&#x2122; already install<\/li>\n<li><a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">JDK 6<\/a> or later<\/li>\n<\/ul>\n<h1 style=\"text-align: justify;\">Spring Initialzr<\/h1>\n<p style=\"text-align: justify;\">Starting a project using Spring is quite easy, as Pivotal has kindly created a Web Site for helping us bootstrap our new application. This Site is called <a href=\"https:\/\/start.spring.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Initializr<\/a>.<\/p>\n<p style=\"text-align: justify;\">Once the page has finished loading, click on the link <em>&#8220;Switch to the full version&#8221;<\/em>. This will display additional fields. Something similar to what is shown in the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"182\" data-permalink=\"http:\/\/www.canchito-dev.com\/public\/blog\/2017\/04\/16\/build-a-project-with-spring-initializer-or-spring-tool-suite\/spring_initializr-2\/\" data-orig-file=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr.png\" data-orig-size=\"1920,963\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"spring_initializr\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr-300x150.png\" data-large-file=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr-1024x514.png\" class=\"aligncenter wp-image-182 size-full\" src=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr.png\" alt=\"\" width=\"1920\" height=\"963\" srcset=\"http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr.png 1920w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr-300x150.png 300w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr-768x385.png 768w, http:\/\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2017\/04\/spring_initializr-1024x514.png 1024w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<div class=\"homepage-subtitle\" style=\"text-align: justify;\">\n<p style=\"text-align: justify;\">We will be generating a <em>&#8220;Maven Project&#8221;<\/em> using Spring Boot <em>&#8220;1.5.2&#8221;<\/em>. Let&#8217;s start filling in our new project&#8217;s basic information:<\/p>\n<\/div>\n<ul style=\"text-align: justify;\">\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Group:<\/strong>\u00a0com.canchitodev.example<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Artifact:<\/strong> demoproject<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Name:<\/strong>\u00a0demoproject<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Description:<\/strong>\u00a0Canchito-Dev demo project for Spring Boot<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Package:<\/strong>\u00a0com.canchitodev.example<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Packaging:<\/strong> Jar<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Java Version:<\/strong> 1.8<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Language:<\/strong> Java<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">For the moment, we will not be adding any dependencies. So let&#8217;s just click on the &lt;Generate Project&gt; button, and it will automatically generate a zip file with your newly created project.<\/p>\n<p style=\"text-align: justify;\">But what is project good for, if it is just a zip and does nothing? So, go to the folder where the zip was downloaded, and unzip it. Once it has finished, you can import it into your favorite IDE. In my case, I will be using Eclipse IDE for Java Developer version Mars.2 Release 4.5.2 (which can be downloaded from <a href=\"http:\/\/www.eclipse.org\/downloads\/packages\/eclipse-ide-java-ee-developers\/marsr\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>). To import it, follow these steps:<\/p>\n<ol style=\"text-align: justify;\">\n<li style=\"text-align: justify;\">In\u00a0Eclipse,\u00a0go to <em>&#8220;File&#8221; &gt; &#8220;Import&#8221;<\/em>.<\/li>\n<li style=\"text-align: justify;\">Select <em>&#8220;Maven&#8221; &gt; &#8220;Existing Maven Project&#8221;<\/em> as the type of project to import and click .<\/li>\n<li style=\"text-align: justify;\">Browse to the folder were the project is located and click .<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Among the imported files, you will see one called <code>pom.xml<\/code>. This is the file where Maven projects are defined.\u00a0Among other things, this file gives the project\u2019s name, version, and dependencies that it has on external libraries.<\/p>\n<h1 style=\"text-align: justify;\">Spring Tool Suite&#x2122;<\/h1>\n<p style=\"text-align: justify;\">There is no better description of what\u00a0<a href=\"https:\/\/spring.io\/tools\/sts\" target=\"_blank\" rel=\"noopener noreferrer\">Spring Tool Suite&#x2122;<\/a> is, than the one found in its official site: <em>&#8220;The Spring Tool Suite&#x2122; is an Eclipse-based development environment that is customized for developing Spring applications. It provides a ready-to-use environment to implement, debug, run, and deploy your Spring applications, including integrations for Pivotal tc Server, Pivotal Cloud Foundry, Git, Maven, AspectJ, and comes on top of the latest Eclipse releases&#8221;<\/em>. You can learn more by visiting the official site.<\/p>\n<p style=\"text-align: justify;\">Follow these steps for creating a new project in\u00a0Spring Tool Suite&#x2122;:<\/p>\n<ol style=\"text-align: justify;\">\n<li style=\"text-align: justify;\">In the main menu, click on\u00a0<em>&#8220;File&#8221; &gt; &#8220;New&#8221;<\/em>.\u00a0The <em>&#8220;New Project&#8221;<\/em> window will appear.<\/li>\n<li style=\"text-align: justify;\">Expand the <em>&#8220;Spring&#8221;<\/em> folder and select <em>&#8220;Spring Starter Project&#8221;<\/em>.<\/li>\n<li style=\"text-align: justify;\">Let&#8217;s start filling in our new project&#8217;s basic information:\n<ul>\n<li class=\"homepage-subtitle\"><strong>Name:<\/strong>\u00a0demoproject-sts<\/li>\n<li style=\"text-align: justify;\">Browse to the folder were the project is located and click .<\/li>\n<li class=\"homepage-subtitle\"><strong>Group:<\/strong>\u00a0com.canchitodev.example<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Artifact:<\/strong> demoproject<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Description:<\/strong>\u00a0Canchito-Dev demo project for Spring Boot<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Package:<\/strong>\u00a0com.canchitodev.example<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Packaging:<\/strong> Jar<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Java Version:<\/strong> 1.8<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Language:<\/strong> Java<\/li>\n<li class=\"homepage-subtitle\" style=\"text-align: justify;\"><strong>Version:<\/strong>\u00a00.0.1-SNAPSHOT<\/li>\n<\/ul>\n<\/li>\n<li style=\"text-align: justify;\">Click on the &lt;Next&gt; button. The <em>&#8220;New Spring Starter Project Dependencies&#8221;<\/em> window is displayed.<\/li>\n<li style=\"text-align: justify;\">Just as in the previous section, we will at the moment nos add or incluyed dependencies on our project. So, just continue by clicking on the &lt;Finish&gt; button.<\/li>\n<\/ol>\n\n<h1 class=\"sect1\" style=\"text-align: justify;\">Summary<\/h1>\n<p style=\"text-align: justify;\">Congratulation! You have created your first project using Spring Initializr and Spring Tool Suite&#x2122;. In the upcoming posts, we will be creating projects and manually including dependencies by modifying the <code>pom.xml<\/code> file. So stay tune.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide walks you through using Spring Initializr or Spring Tool Suite&#x2122; for building a simple Java project compatible with Maven and Spring.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[12,6,7,13,5,14],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-spring","tag-eclipse","tag-framework","tag-initializer","tag-java","tag-spring","tag-spring-tool-suite"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p8EwXo-f","jetpack-related-posts":[{"id":419,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/27\/triggerable-custom-service-tasks-in-flowable\/","url_meta":{"origin":15,"position":0},"title":"Triggerable Custom Service Tasks in Flowable","author":"canchitodev","date":"June 27, 2020","format":false,"excerpt":"In this tutorial, we will be implementing a triggerable custom service task in Flowable. A triggerable task, is one that when it is reached, it is executes its business logic, but once done, it enters a wait state. In order to leave this state, it must be triggered.","rel":"","context":"In &quot;Flowable&quot;","block_context":{"text":"Flowable","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/flowable\/"},"img":{"alt_text":"CANCHITO-DEV: Spring Initializr","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=1050%2C600 3x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=1400%2C800 4x"},"classes":[]},{"id":372,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/07\/create-custom-service-tasks-for-flowable\/","url_meta":{"origin":15,"position":1},"title":"Create Custom Service Tasks for Flowable","author":"canchitodev","date":"June 7, 2020","format":false,"excerpt":"In\u00a0this\u00a0tutorial,\u00a0we\u00a0will\u00a0be\u00a0implementing\u00a0a\u00a0custom\u00a0service\u00a0task\u00a0in\u00a0Flowable\u00a0","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Spring Initializr","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=1050%2C600 3x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr.png?resize=1400%2C800 4x"},"classes":[]},{"id":471,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/06\/27\/flowable-custom-engine-configuration\/","url_meta":{"origin":15,"position":2},"title":"Customizing Flowable Engine","author":"canchitodev","date":"June 27, 2020","format":false,"excerpt":"In this article, we will go into detail on how to customize Flowable's engine. Three changes to the engine will be done: (1) Change the database connection by modifying the data source and adding custom data source properties. (2)Use a strong UUID generator. (3)Implement a custom event handler.","rel":"","context":"In &quot;BPM&quot;","block_context":{"text":"BPM","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/bpm\/"},"img":{"alt_text":"CANCHITO-DEV: Spring Initializr","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/05\/initializr-1024x674.png?resize=525%2C300 1.5x"},"classes":[]},{"id":499,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2020\/11\/22\/spring-security-with-saml2-and-okta\/","url_meta":{"origin":15,"position":3},"title":"Spring Security with SAML2 and Okta","author":"canchitodev","date":"November 22, 2020","format":false,"excerpt":"Greetings! In this post, we will be showing you how to build a Spring Boot application that uses Okta as platform for authentication via SAML (Security Assertion Markup Language). Ready to get started?","rel":"","context":"In &quot;Open Source&quot;","block_context":{"text":"Open Source","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/open-source\/"},"img":{"alt_text":"CANCHITO-DEV: Successful sign in","src":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/11\/success-sign-in.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/11\/success-sign-in.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/11\/success-sign-in.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.canchito-dev.com\/public\/blog\/wp-content\/uploads\/2020\/11\/success-sign-in.png?resize=700%2C400 2x"},"classes":[]},{"id":34,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2017\/04\/22\/build-a-rest-api-with-spring\/","url_meta":{"origin":15,"position":4},"title":"Build a REST API with Spring","author":"canchitodev","date":"April 22, 2017","format":false,"excerpt":"In this guide, you will learn how to set up and build a simple REST API with Spring, that provides CRUD operations for entries that are saved into a database. In addition, you will learn how to map HTTP request to specific URL and its response codes, and how to\u2026","rel":"","context":"In &quot;REST&quot;","block_context":{"text":"REST","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/rest\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":263,"url":"http:\/\/www.canchito-dev.com\/public\/blog\/2018\/06\/11\/spring-boot-actuator-production-ready-features\/","url_meta":{"origin":15,"position":5},"title":"Spring Boot Actuator &#8211; Production-ready features","author":"canchitodev","date":"June 11, 2018","format":false,"excerpt":"In this post, we\u2019re going to introduce Spring Boot Actuator, by first covering the basics. Afterwards,\u00a0you will create a Spring project and learn how to use, configure and extend this monitoring tool.","rel":"","context":"In &quot;Actuator&quot;","block_context":{"text":"Actuator","link":"http:\/\/www.canchito-dev.com\/public\/blog\/category\/actuator\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":17,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":555,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/posts\/15\/revisions\/555"}],"wp:attachment":[{"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.canchito-dev.com\/public\/blog\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}