Skip to content

An extension for Visual Studio Code which adds useful snippets for Spring Boot. These are especially useful for creating REST apis, and configuring database connection properties

Notifications You must be signed in to change notification settings

DeveloperSoapbox/vscode-springboot-snippets

Repository files navigation

Spring Boot Snippets for VS Code

This extension for Visual Studio Code adds useful snippets for Spring Boot. These are especially useful for creating REST apis, and configuring database connection properties.

Usage

For a detailed walkthrough, please use this youtube video - https://www.youtube.com/watch?v=qI7hTw8aMaU

Type part of a snippet, press enter, and the snippet unfolds.

Alternatively, press Ctrl+Space (Windows, Linux) or Cmd+Space (macOS) to activate snippets from within the editor.

Java Snippets

Snippet Purpose
spring-crudctrl Spring controller with CRUD actions implemented
spring-crudrepo Spring Data JPA CRUD repository with REST api annotation
spring-jparepo Spring Data JPA repository with REST api annotation
spring-entity JPA entity with ID field
spring-lombok-entity JPA entity with ID field and Lombok @Data annotation
spring-ctrl-getall Controller GET action for collection
spring-ctrl-getone Controller GET action for single item
spring-ctrl-post Controller POST action
spring-ctrl-put Controller PUT action
spring-ctrl-delete Controller DELETE action

application.properties / application.yaml Snippets

Snippet Purpose
spring-sqlite SQLite database jdbc url and properties
spring-sqlserver SQL Server database jdbc url and properties
spring-oracle Oracle database jdbc url and properties
spring-postgresql PostgreSQL database jdbc url and properties
spring-mysql MySQL database jdbc url and properties
spring-h2 H2 database jdbc url and properties

Installation

  1. Install Visual Studio Code 1.44.0 or higher
  2. Launch Code
  3. From the command palette Ctrl-Shift-P (Windows, Linux) or Cmd-Shift-P (OSX)
  4. Select Install Extension
  5. Choose the extension
  6. Reload Visual Studio Code

About

An extension for Visual Studio Code which adds useful snippets for Spring Boot. These are especially useful for creating REST apis, and configuring database connection properties

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published