[Java] Until creating a Spring Boot project with Intellij and pushing it to Github

less than 1 minute read

Overview

We have summarized the procedure for building a project environment using Spring Boot. I often forget the procedure, so I will write up to pushing to Github for myself.

Environment

Spring Boot 2.3.1 (Spring Framework 5.2.7) Java11 (OpenJDK 11.0.2) Intellij Community Edition 2019.1.3

For those who do not have Java 11, the following articles will be helpful. Install OpenJDK 11 on macOS with Homebrew

Create project

If you have Intellij Ultimate Edition, you can use Spring Initizalizr.

Install the “Spring Assistant” plugin.  Screenshot 2020-06-20 22.24.49.png Screenshots 2020-06-20 22.25.09.png

Restart Intellij and create a new project. If you select Spring Assistant, you can easily create a project like Spring Initializr. The setting value is

  • Project SDK: 11.0.2
  • Spring Initializr Server: Default

Choose.

Dependencies can be added later, so add only the minimum. I have Spring Web.

PUSH to Github

First, create a new repository on Github. Screenshots 2020-06-20 22.40.42.png Use the one that pushes an existing repository. Execute the following command in the local repository created earlier.

git init
git add.
git cm -m "initial commit"
git remote add origin [email protected]:pandarkness/sample.git
git push -u origin master

I have easily created a working Spring application.