SPRING BOOT learning record 01

SPRINGBOOT.001.jpeg

Spring A framework for Java development. Strong against change. The code is highly readable. Highly reusable.

DI Dependency Injection Instance management

AOP Aspect Oriented Programing Summary of common processing

Library

DevTools Automatically restart the WEB application

Lombok Use of Lombok

H2 Test environment DB

JDBC Database access

Thymeleaf HTML template engine

Web Using SpringMVC Spring Boot

MVC model

MVC.001.jpeg

Controller Request processing to the Model class for the request.

Model Data acquisition and calculation from DB.

Viwe Screen display.

HelloWorld

GET method

Used when getting information from the server Information that you do not want others to see is not sent by GET Text data transmission

SpringSampleApplication.java A program that runs Spring.

@Controller Controller class.

GetMapping Handles GET method of HTTP request. Add get to the beginning of the method name. For the return value, specify the html file name without the extension.

html xmlns:th="http://www.thymeleeaf.org" Described to use timeleaf.

Internal processing

内部処理.001.jpeg

th:value You can pass values from the screen to the controller class.

@PostMapping Processing when the POST method is sent.

@RequestParam Allows you to receive input from the screen.

model.addAttribute Register the value received from the screen in Model. Set the key and value. Key: Variable name

Get value from DB

DB接続.001.jpeg

application.properties A file for setting environment-specific settings.

https://qiita.com/YAKINIKU/items/bba6d8f0cb2a418ea0ea

https://qiita.com/niwasawa/items/024a01c502962eb90b1d

findOne() Access all documents

@Repository Granted to the repository class.

@Autowired Instance creation.

@Data Automatic creation of getter / setter.

domain class

A class to pass to and from the repository class and service class. (DTO)

@Servise Service class.

Recommended Posts

SPRING BOOT learning record 01
SPRING BOOT learning record 02
Spring Boot learning procedure
Learning Spring Boot [Beginning]
Spring Boot for annotation learning
Cassandra x Spring Boot struggle record
Challenge Spring Boot
My learning record
Spring Boot Form
Spring Boot Memorandum
gae + spring boot
Spring Boot + Heroku Postgres
Spring boot memo writing (1)
First Spring Boot (DI)
Spring Boot2 cheat sheet
Spring Boot exception handling
Spring Boot Servlet mapping
Spring boot development-development environment-
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
Ruby on rails learning record -2020.10.03
Spring Boot on Microsoft Azure
Implement GraphQL with Spring Boot
Ruby on rails learning record -2020.10.04
Spring Boot tutorial task schedule
Ruby on rails learning record -2020.10.05
Spring 5 & Spring Boot 2 Hands-on preparation procedure
Ruby on rails learning record -2020.10.09
Get started with Spring boot
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
[Java] Thymeleaf Basic (Spring Boot)
Ruby on rails learning record-2020.10.07 ②
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
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
Ruby on rails learning record-2020.10.07 ①
Set cookies with Spring Boot
[Spring Boot] Easy paging recipe
Use Spring JDBC with Spring Boot
Docker × Spring Boot environment construction