Spring Boot Memorandum

I just touched Spring Boot, so I made a note of what I understood as a memorandum.

Hello World

For the time being, read Getting started Let's see.

Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications that you can run.

__ You can run a commercial-level Spring-based app standalone! Is it like __?

Things necessary

How to move

There are several ways, but all of them are able to start the application with one touch without deploying after starting the web server + application server. __ Does this area feel like "standalone"?

Boot with Spring Boot CLI

Download the CLI and use sprint.bat in the bin folder to start the application (class file) written in Java.

spring run created class file

Just by starting with, the web server + application server will start and Hello World will appear at localhost: 8080.

boot with mvn spring-boot: run

Write the required definition in pom.xml, write a controller-like class, and start the app from Maven.

mvn spring-boot:run

It is built with, the web server + application server starts, and Hello World appears at localhost: 8080.

Launched in Executable Jar

Write the necessary definition in pom.xml, write a controller-like class, create a jar with Maven, and start the application.

mvn package
java -jar (Jar file)

Then, the web server + application server starts and Hello World appears at localhost: 8080. It seems that this Executable Jar can be used as it is as a batch file for starting and stopping services. Reference Why does Fully Executable Jar in Spring Boot work

RESTful Web API trial

Continue reading Building a RESTful Web Service.

Basic configuration

Understand the basic configuration through RESTful Web API implementation samples.

Run

Implement the above and start the server with mvn spring-boot: run. When you access http: // localhost: 8080 / xxxxx (where xxxxx is the resource name), The mapped method of the controller is called and JSON is returned.

What I noticed

from now on

Read Official guide page. I will add what I understood.

Recommended Posts

Spring Boot Memorandum
Memorandum of understanding when Spring Boot 1.5.10 → Spring Boot 2.0.0
Challenge Spring Boot
Spring Boot Form
gae + spring boot
Memorandum (Spring Web)
Local file download memorandum in Spring Boot
SPRING BOOT learning record 01
Spring Boot + Heroku Postgres
First Spring Boot (DI)
SPRING BOOT learning record 02
Spring Boot2 cheat sheet
Spring Boot exception handling
Spring Boot Servlet mapping
Spring boot development-development environment-
Spring Boot learning procedure
Learning Spring Boot [Beginning]
Spring boot memo writing (2)
Spring Boot 2.2 Document Summary
[Spring Boot] DataSourceProperties $ DataSourceBeanCreationException
Spring Boot 2.3 Application Availability
Spring boot tutorials Topics
Download with Spring Boot
[Spring Boot] Environment construction (macOS)
Set context-param in Spring Boot
Try Spring Boot from 0 to 100.
Generate barcode with Spring Boot
Hello World with Spring Boot
Spring Boot on Microsoft Azure
Implement GraphQL with Spring Boot
Spring Boot tutorial task schedule
A memorandum of addiction to Spring Boot2 x Doma2
Spring 5 & Spring Boot 2 Hands-on preparation procedure
Hello World with Spring Boot!
Spring Boot 2 multi-project in Gradle
[Spring Boot] Web application creation
spring boot port duplication problem
Run LIFF with Spring Boot
SNS login with Spring Boot
Spring Boot Hot Swapping settings
memorandum
[Java] Thymeleaf Basic (Spring Boot)
Introduction to Spring Boot ① ~ DI ~
File upload with Spring Boot
Spring Boot starting with copy
Introduction to Spring Boot ② ~ AOP ~
CICS-Run Java application-(4) Spring Boot application
A memorandum when creating a REST service with Spring Boot
Spring Boot starting with Docker
Spring Boot + Springfox springfox-boot-starter 3.0.0 Use
Spring Boot DB related tips
Hello World with Spring Boot
Set cookies with Spring Boot
Use Spring JDBC with Spring Boot
Docker × Spring Boot environment construction
Major changes in Spring Boot 1.5
Add module with Spring Boot
NoHttpResponseException in Spring Boot + WireMock
[Spring Boot] Send an email
Spring Boot performance related settings
Introduction to Spring Boot Part 1