With a new workstation, I usually grab the latest versions I can get of Java, Git CLI, Spring Tool Suite, Gradle CLI, and Node.js. Grab the appropriate versions for your OS, and install each of them in turn.
Next, make a directory to store your project code separate from your Eclipse workspace. I like to create a "git" directory in my user directory to store my project code. Trust me, you will find this useful later.
After installing Spring Tool Suite, I add in support for Gradle by going to the "Help" -> "Dashboard" menu, and then clicking the "IDE Extensions" button in the "Manage" section of the resulting page. Then, under the "Language and Framework Tooling" section, I select "Gradle Support" and click the "Install" button. Answer any questions, and let the IDE restart, and you should be good to start.
Next, I start a project by going to "File" -> "New" -> "Spring Starter Project". This will create a project that uses Spring Boot, which is a fantastic way to create modern Spring applications.
Now that I have the basics done for the project, I typically like to start up the project just to make sure everything is working ok. In Spring Tool Suite 3.7.1, there is a function called the "Boot Dashboard" that allows you to easily launch Spring Boot applications. You may need to go to the "Window" -> "Show View" -> "Other" menu to find it and open the "Boot Dashboard". If you can't find it, you can right click on the project, and select "Run as" - > "Spring Boot App" to launch your application as well.
In either case, when you launch your application, it will start up and begin accepting connections at http://localhost:8080. If you see "java.lang.IllegalStateException: Tomcat connector in failed state" error text in the Console view, it is likely you already have something running on your machine that is listening on port 8080. You will need to configure the embedded Tomcat server that Spring Boot is using to listen on a different port. You can do this be either going to the Boot Dashboard view, and right clicking on your project and selecting "Open Config", or you can go to the "Run" -> "Run Configurations" menu, and Try port 8081 or some other port number that you can remember.
the reference page for externalizing configuration properties for Spring Boot applications. Properties can be specified in properties files, or YAML files, Environment variables, via command line arguments, and other methods.
Once the application successfully starts up, you can right click on it in the "Boot Dashboard" view and select "Open Web Browser", or you can just go to http://localhost:8080 (or whatever port you changed your application to listen on) in your favorite browser.
<html> <body> <h1>Hello World!</h1> </body> </html>
Now, either right click on your application in the "Boot Dashboard" and select "(Re)start", or click the red square in the "Console" view to Terminate the running app, and then re-launch it by right clicking on the project and selecting "Run as" -> "Spring Boot Application" from the context menu.
Browse to your application as before, and you should now see some swank "Hello World" goodness.
Next, right click on your project in the "Package Explorer" tab, and select "Team" -> "Commit". Select all your files, add a commit comment, and click the "Commit" button. This doesn't store your files out on a server, but it at least captures this working version of your application locally in case you need to roll back to it.
This stage of the project is available at https://github.com/cdelashmutt-pivotal/testopa under the "post-1" tag. Simply clone the repo, and then check out the "post-1" tag to see the results.