Spring Boot programming with VS Code

Introduction

I thought "I have to use IntelliJ or STS with Spring Boot even though VS Code is easy to use", so I decided to create a Spring Boot environment with VS Code. I thought, but since there was already a pioneer, it is a reference. Run Spring Boot project in VS Code I mainly write the parts that are not touched there.

Basic

From Extensions. Lombok personally.

Code formatting

Maybe this is the main.

Prettier スクリーンショット 2018-09-09 10.14.01.png An extension for auto-formatting code. Put it in first. I think that the formatting rules can be decided from the settings, but since there is a lot of trouble, I will put Formatter next.

Formatter You can search for functions with command + shift + P on VS Code, so if you search for format there, it will be a candidate. スクリーンショット 2018-09-09 10.17.01.png This is what comes out. If you select this, you will be asked for the format file name, so select it (by default for the time being). スクリーンショット 2018-09-09 10.20.18.png If the specified format file does not exist, you will be asked "Do you want to create a new one?", So Yes. スクリーンショット 2018-09-09 10.20.40.png Then a format file will be created in the project, so open it. スクリーンショット 2018-09-09 10.24.39.png There will be a lot of format settings, so change it to your liking. Finally, specify the format file in WorkSpace Settings (probably set automatically). スクリーンショット 2018-09-09 10.28.15.png You should be able to format it with this, but I also want it to be automatically formatted when saving.

Automatic shaping

If you want to format when saving only in Java, go to User Settings

"editor.formatOnSave": false,
"[java]": {
    "editor.formatOnSave": true
}

Just list.

Impressions

There are so many things and so many things that VS Code isn't an IDE anymore? I think.

Recommended Posts

Spring Boot programming with VS Code
Try using Spring Boot with VS Code
Create Spring Boot environment with Windows + VS Code
Download with Spring Boot
Run a Spring Boot project in VS Code
Introduction to Java development environment & Spring Boot application created with VS Code
Hello World with Spring Boot
Implement GraphQL with Spring Boot
Docker management with VS Code
Get started with Spring boot
Hello World with Spring Boot!
Format Ruby with VS Code
Run LIFF with Spring Boot
SNS login with Spring Boot
Hello World with VS Code!
File upload with Spring Boot
Spring Boot starting with copy
Spring Boot starting with Docker
Hello World with Spring Boot
Set cookies with Spring Boot
Use Spring JDBC with Spring Boot
Add module with Spring Boot
Getting Started with Spring Boot
Create microservices with Spring Boot
Send email with spring boot
Beginners create Spring Tools Suite environment with VS Code
From creating a Spring Boot project to running an application with VS Code
Use Basic Authentication with Spring Boot
Spring Boot application code review points
What I was addicted to when developing a Spring Boot application with VS Code
gRPC on Spring Boot with grpc-spring-boot-starter
Create an app with Spring Boot 2
Hot deploy with Spring Boot development
Database linkage with doma2 (Spring boot)
Java Spring environment in vs Code
Until "Hello World" with Spring Boot
Inquiry application creation with Spring Boot
Java --Jersey Framework vs Spring Boot
Get validation results with Spring Boot
Java build with mac vs code
(Intellij) Hello World with Spring Boot
Create an app with Spring Boot
Try hitting the zip code search API with Spring Boot
Google Cloud Platform with Spring Boot 2.0.0
Check date correlation with Spring Boot
I tried GraphQL with Spring Boot
[Java] LINE integration with Spring Boot
Beginning with Spring Boot 0. Use Spring CLI
Getting Started with Docker with VS Code
A memo to start Java programming with VS Code (2020-04 version)
I tried Flyway with Spring Boot
Message cooperation started with Spring Boot
Spring Boot gradle build with Docker
Sample code to unit test a Spring Boot controller with MockMvc
Processing at application startup with Spring Boot
Prepare Java development environment with VS Code
Hello World with Eclipse + Spring Boot + Maven
Perform transaction confirmation test with Spring Boot
HTTPS with Spring Boot and Let's Encrypt
Start web application development with Spring Boot
Launch Nginx + Spring Boot application with docker-compose